Skip to content

Commit

Permalink
refactor: HoverTimerActions -> PreviewHoverAction (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShlomoCode authored Jul 12, 2024
1 parent 2b18e34 commit c037a62
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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 @@ -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)
}
}
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

0 comments on commit c037a62

Please sign in to comment.