mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix alert for pro
This commit is contained in:
parent
4e9b2070de
commit
991dd0f29d
@ -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"])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user