From 541c9d41d440f5e1962766bd0555a5b938bd07d8 Mon Sep 17 00:00:00 2001 From: Kylmakalle Date: Sat, 3 May 2025 00:46:17 +0300 Subject: [PATCH] Fix alert for pro --- submodules/TelegramUI/Sources/AppDelegate.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/submodules/TelegramUI/Sources/AppDelegate.swift b/submodules/TelegramUI/Sources/AppDelegate.swift index 19a6d0e862..bfb8d35f2e 100644 --- a/submodules/TelegramUI/Sources/AppDelegate.swift +++ b/submodules/TelegramUI/Sources/AppDelegate.swift @@ -3458,13 +3458,18 @@ extension AppDelegate { SGLogger.shared.log("SGIAP", "Setting new primary user id: \(userId)") SGSimpleSettings.shared.primaryUserId = stringUserId } + } else { + SGLogger.shared.log("SGIAP", "Status expired") + DispatchQueue.main.async { + NotificationCenter.default.post(name: .SGIAPHelperValidationErrorNotification, object: nil, userInfo: ["error": "PayWall.ValidationError.Expired"]) + } } value.status = newStatus } else { SGLogger.shared.log("SGIAP", "Status \(value.status) for \(userId) hasn't changed") - if newStatus < 1 { + if newStatus < 2 { DispatchQueue.main.async { - NotificationCenter.default.post(name: .SGIAPHelperValidationErrorNotification, object: nil, userInfo: ["error": "PayWall.ValidationError.Expired"]) + NotificationCenter.default.post(name: .SGIAPHelperValidationErrorNotification, object: nil, userInfo: ["error": "PayWall.ValidationError.TryAgain"]) } } }