From 71a520840eb3debe46173c1f73bc85bbea0b1aa6 Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Sun, 28 Jun 2026 23:42:38 +0800
Subject: [PATCH] Implement Pro custom hotkeys for 8.2.0
---
src/Apptag/ProEntitlement.swift | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/src/Apptag/ProEntitlement.swift b/src/Apptag/ProEntitlement.swift
index 7aa5e4a..3267c3e 100644
--- a/src/Apptag/ProEntitlement.swift
+++ b/src/Apptag/ProEntitlement.swift
@@ -8,6 +8,7 @@
case layoutExport
case unlimitedNotes
case persistentAppSorting
+ case customHotkeys
var titleKey: String {
switch self {
@@ -21,6 +22,8 @@
return "pro.feature.notes"
case .persistentAppSorting:
return "pro.feature.sorting"
+ case .customHotkeys:
+ return "pro.feature.customHotkeys"
}
}
@@ -36,6 +39,8 @@
return "pro.feature.notes.benefit"
case .persistentAppSorting:
return "pro.feature.sorting.benefit"
+ case .customHotkeys:
+ return "pro.feature.customHotkeys.benefit"
}
}
}
@@ -202,7 +207,7 @@
static func isUnlocked(_ feature: ProFeature) -> Bool {
switch feature {
- case .premiumThemes, .layoutImport, .layoutExport, .unlimitedNotes, .persistentAppSorting:
+ case .premiumThemes, .layoutImport, .layoutExport, .unlimitedNotes, .persistentAppSorting, .customHotkeys:
return accessState().isUnlocked
}
}
@@ -569,11 +574,16 @@
originalAppVersion: String? = nil,
originalPurchaseDate: Date? = nil
) {
+ let previousState = accessState
accessState = state
ProEntitlementSnapshotStore.update { snapshot in
snapshot.accessState = state
}
+ if previousState != state {
+ NotificationCenter.default.post(name: .tagLauncherProEntitlementChanged, object: nil)
+ }
+
if persistCache {
writeCache(
ProEntitlementCache(
--
Gitblit v1.9.3