Frozen account improvements

This commit is contained in:
Ilya Laktyushin
2025-03-19 16:40:26 +04:00
parent ef3eb05d69
commit 5e79ec4b32
16 changed files with 109 additions and 47 deletions

View File

@@ -15,7 +15,7 @@ import TelegramPresentationData
import TelegramNotices
extension ChatControllerImpl {
func presentAccountFrozenInfoIfNeeded() -> Bool {
func presentAccountFrozenInfoIfNeeded(delay: Bool = false) -> Bool {
if self.context.isFrozen {
let accountFreezeConfiguration = AccountFreezeConfiguration.with(appConfiguration: self.context.currentAppConfiguration.with { $0 })
if let freezeAppealUrl = accountFreezeConfiguration.freezeAppealUrl {
@@ -24,7 +24,16 @@ extension ChatControllerImpl {
return false
}
}
self.push(self.context.sharedContext.makeAccountFreezeInfoScreen(context: self.context))
let present = {
self.push(self.context.sharedContext.makeAccountFreezeInfoScreen(context: self.context))
}
if delay {
Queue.mainQueue().after(0.3) {
present()
}
} else {
present()
}
return true
}
return false