From c037a62ac428c5de348f46dbee4325aa9e3f51e1 Mon Sep 17 00:00:00 2001 From: Shlomo <78599753+ShlomoCode@users.noreply.github.com> Date: Fri, 12 Jul 2024 03:29:41 +0300 Subject: [PATCH] refactor: HoverTimerActions -> PreviewHoverAction (#173) --- DockDoor/Views/Hover Window/WindowPreview.swift | 2 +- DockDoor/Views/Settings/MainSettingsView.swift | 2 +- DockDoor/consts.swift | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DockDoor/Views/Hover Window/WindowPreview.swift b/DockDoor/Views/Hover Window/WindowPreview.swift index 8e9b436..6de23f3 100644 --- a/DockDoor/Views/Hover Window/WindowPreview.swift +++ b/DockDoor/Views/Hover Window/WindowPreview.swift @@ -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: diff --git a/DockDoor/Views/Settings/MainSettingsView.swift b/DockDoor/Views/Settings/MainSettingsView.swift index 1fd9c3b..ffd27f9 100644 --- a/DockDoor/Views/Settings/MainSettingsView.swift +++ b/DockDoor/Views/Settings/MainSettingsView.swift @@ -75,7 +75,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) } } diff --git a/DockDoor/consts.swift b/DockDoor/consts.swift index ab310c6..b5932c1 100644 --- a/DockDoor/consts.swift +++ b/DockDoor/consts.swift @@ -23,7 +23,7 @@ extension Defaults.Keys { static let screenCaptureCacheLifespan = Key("screenCaptureCacheLifespan", default: 60 ) static let uniformCardRadius = Key("uniformCardRadius", default: true ) static let tapEquivalentInterval = Key("tapEquivalentInterval", default: 1.5 ) - static let previewHoverAction = Key("previewHoverAction", default: HoverTimerActions.none ) + static let previewHoverAction = Key("previewHoverAction", default: PreviewHoverAction.none ) static let showAnimations = Key("showAnimations", default: true ) static let enableWindowSwitcher = Key("enableWindowSwitcher", default: true ) @@ -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