]> git.r.bdr.sh - rbdr/map/blobdiff - Map/Presentation/Commands/MapCommands.swift
Add some debouncing
[rbdr/map] / Map / Presentation / Commands / MapCommands.swift
index 83c4b273eb60a49459b07feb3a2ade21fad35064..35250e26b76124009f5b35aa77c80592cfd197b0 100644 (file)
@@ -1,19 +1,17 @@
-/*
- Copyright (C) 2024 Rubén Beltrán del Río
+// Copyright (C) 2024 Rubén Beltrán del Río
 
 
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
 
 
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
 
 
- You should have received a copy of the GNU General Public License
- along with this program. If not, see https://map.tranquil.systems.
- */
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see https://map.tranquil.systems.
 import SwiftUI
 
 struct MapCommands: Commands {
 import SwiftUI
 
 struct MapCommands: Commands {
@@ -69,9 +67,7 @@ struct MapCommands: Commands {
     CommandGroup(after: CommandGroupPlacement.pasteboard) {
       Divider()
       Button("Find...") {
     CommandGroup(after: CommandGroupPlacement.pasteboard) {
       Divider()
       Button("Find...") {
-        withAnimation {
-          isSearching = isSearching != nil ? !isSearching! : true
-        }
+        isSearching = isSearching != nil ? !isSearching! : true
       }.keyboardShortcut(
         "f", modifiers: EventModifiers([.command])
       ).disabled(document == nil)
       }.keyboardShortcut(
         "f", modifiers: EventModifiers([.command])
       ).disabled(document == nil)