mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-29 07:20:10 +00:00
Ask for cellular access on first start
This commit is contained in:
@@ -58,6 +58,16 @@ final class UnauthorizedApplicationContext {
|
||||
return .never
|
||||
}
|
||||
})
|
||||
|
||||
DeviceAccess.authorizeAccess(to: .cellularData, presentationData: sharedContext.currentPresentationData.with { $0 }, present: { [weak self] c, a in
|
||||
if let strongSelf = self {
|
||||
(strongSelf.rootController.viewControllers.last as? ViewController)?.present(c, in: .window(.root))
|
||||
}
|
||||
}, openSettings: {
|
||||
sharedContext.applicationBindings.openSettings()
|
||||
}, { result in
|
||||
ApplicationSpecificNotice.setPermissionWarning(accountManager: sharedContext.accountManager, permission: .cellularData, value: 0)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user