Fix alert for pro

This commit is contained in:
Kylmakalle 2025-05-03 00:46:17 +03:00
parent 4e9b2070de
commit 991dd0f29d

View File

@ -3456,13 +3456,18 @@ extension AppDelegate {
SGLogger.shared.log("SGIAP", "Setting new primary user id: \(userId)") SGLogger.shared.log("SGIAP", "Setting new primary user id: \(userId)")
SGSimpleSettings.shared.primaryUserId = stringUserId 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 value.status = newStatus
} else { } else {
SGLogger.shared.log("SGIAP", "Status \(value.status) for \(userId) hasn't changed") SGLogger.shared.log("SGIAP", "Status \(value.status) for \(userId) hasn't changed")
if newStatus < 1 { if newStatus < 2 {
DispatchQueue.main.async { 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"])
} }
} }
} }