This commit is contained in:
Kylmakalle 2025-03-15 03:07:27 +02:00
parent 062b01bd82
commit 6e70a5b77c

View File

@ -38,6 +38,7 @@ private enum SGDebugActions: String {
case fileManager
case clearRegDateCache
case restorePurchases
case setIAP
case resetIAP
}
@ -68,7 +69,9 @@ private func SGDebugControllerEntries(presentationData: PresentationData) -> [SG
entries.append(.toggle(id: id.count, section: .base, settingName: .forceImmediateShareSheet, value: SGSimpleSettings.shared.forceSystemSharing, text: "Force System Share Sheet", enabled: true))
entries.append(.action(id: id.count, section: .base, actionType: .restorePurchases, text: "PayWall.RestorePurchases".i18n(presentationData.strings.baseLanguageCode), kind: .generic))
#if DEBUG
entries.append(.action(id: id.count, section: .base, actionType: .setIAP, text: "Set Pro", kind: .generic))
#endif
entries.append(.action(id: id.count, section: .base, actionType: .resetIAP, text: "Reset Pro", kind: .destructive))
entries.append(.toggle(id: id.count, section: .notifications, settingName: .legacyNotificationsFix, value: SGSimpleSettings.shared.legacyNotificationsFix, text: "[OLD] Fix empty notifications", enabled: true))
@ -167,6 +170,9 @@ public func sgDebugController(context: AccountContext) -> ViewController {
nil)
}
}
case .setIAP:
#if DEBUG
#endif
case .resetIAP:
let updateSettingsSignal = updateSGStatusInteractively(accountManager: context.sharedContext.accountManager, { status in
var status = status