feat: add Finder, ranking reset, and quit actions

This commit is contained in:
2026-10-13 17:38:29 +02:00
parent 7cfd8096a4
commit 400917de3b
7 changed files with 90 additions and 4 deletions
+9
View File
@@ -31,6 +31,15 @@ public final class LaunchHistory {
if record.count < Int.max { record.count += 1 }
record.lastLaunch = timestamp
usage[application.id] = record
save()
}
public func resetRanking(of application: Application) {
usage.removeValue(forKey: application.id)
save()
}
private func save() {
var saved: [String: [String: Any]] = [:]
saved.reserveCapacity(usage.count)
for (url, record) in usage {