Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: HoverTimerActions -> PreviewHoverAction #173

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DockDoor/Views/Hover Window/WindowPreview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ struct WindowPreview: View {
}
}

private func handleFullPreviewHover(isHovering: Bool, action: HoverTimerActions) {
private func handleFullPreviewHover(isHovering: Bool, action: PreviewHoverAction) {
if isHovering && !ScreenCenteredFloatingWindow.shared.windowSwitcherActive {
switch action {
case .none:
Expand Down
2 changes: 1 addition & 1 deletion DockDoor/Views/Settings/MainSettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct MainSettingsView: View {

HStack {
Picker("Preview Hover Action", selection: $previewHoverAction) {
ForEach(HoverTimerActions.allCases, id: \.self) { action in
ForEach(PreviewHoverAction.allCases, id: \.self) { action in
Text(action.localizedName).tag(action)
}
}
Expand Down
4 changes: 2 additions & 2 deletions DockDoor/consts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extension Defaults.Keys {
static let screenCaptureCacheLifespan = Key<CGFloat>("screenCaptureCacheLifespan", default: 60 )
static let uniformCardRadius = Key<Bool>("uniformCardRadius", default: true )
static let tapEquivalentInterval = Key<CGFloat>("tapEquivalentInterval", default: 1.5 )
static let previewHoverAction = Key<HoverTimerActions>("previewHoverAction", default: HoverTimerActions.none )
static let previewHoverAction = Key<PreviewHoverAction>("previewHoverAction", default: PreviewHoverAction.none )

static let showAnimations = Key<Bool>("showAnimations", default: true )
static let enableWindowSwitcher = Key<Bool>("enableWindowSwitcher", default: true )
Expand Down Expand Up @@ -116,7 +116,7 @@ enum TrafficLightButtonsVisibility: String, CaseIterable, Defaults.Serializable
}
}

enum HoverTimerActions: String, CaseIterable, Defaults.Serializable {
enum PreviewHoverAction: String, CaseIterable, Defaults.Serializable {
case none
case tap
case previewFullSize
Expand Down