Skip to content
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
7 changes: 2 additions & 5 deletions Crisp/Services/HotkeyService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,9 @@ final class HotkeyService {
Self.log.info("hotkey press: id \(id), known=\(self.registrations[id] != nil)")
switch registrations[id]?.target {
case .preset(let presetID):
// Same guards as tapping the preset row: no-op while one applies or
// when this preset is already the active (checkmarked) one, so a
// repeat press doesn't re-apply and jiggle the row.
// Same guards as tapping the preset row: no-op while one applies.
guard let preset = PresetService.shared.presets.first(where: { $0.id == presetID }),
!PresetService.shared.isApplying,
PresetService.shared.activePresetID != presetID
!PresetService.shared.isApplying
else { return }
Task { await PresetService.shared.applyPreset(preset) }
case .hidpiToggle:
Expand Down
5 changes: 3 additions & 2 deletions Crisp/Views/PresetListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ struct PresetRow: View {
.menuRowHover(isHovered)
.contentShape(Rectangle())
.onTapGesture {
// Already the active preset (the checkmarked row): tapping it is a no-op.
guard PanelOpenGuard.allowsActivation, !PresetService.shared.isApplying, !isCurrentMatch else { return }
// The checkmarked row applies again too: a change made outside Crisp
// leaves the checkmark on (#212).
guard PanelOpenGuard.allowsActivation, !PresetService.shared.isApplying else { return }
Task { await PresetService.shared.applyPreset(preset) }
}
.onHover { isHovered = $0 }
Expand Down
Loading