fix: complete Command presentation teardown

This commit is contained in:
Valdemar Lorenzen
2026-10-16 15:36:04 +02:00
parent 586c8a7560
commit cd2e3da330
6 changed files with 115 additions and 25 deletions
+3 -3
View File
@@ -110,10 +110,10 @@ final class EmojiPickerController: NSViewController, NSCollectionViewDataSource,
@objc private func categoryChanged() { inputChanged() }
@objc func goBack() {
if actions.isShown { actions.close() } else { closed?() }
if actions.isShown { actions.close() } else { close() }
}
func close() {
actions.close()
actions.close(animated: false)
closed?()
}
override func cancelOperation(_ sender: Any?) { goBack() }
@@ -254,7 +254,7 @@ final class EmojiPickerController: NSViewController, NSCollectionViewDataSource,
var recent = defaults.stringArray(forKey: "recentEmoji") ?? []
recent.removeAll { $0 == value }
defaults.set(Array(([value] + recent).prefix(30)), forKey: "recentEmoji")
closed?()
actions.close(animated: false)
if pasting { pasteRequested?() } else { copied?() }
}