mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-07 13:35:09 +00:00
Various improvements
This commit is contained in:
@@ -660,11 +660,18 @@ public func dataAndStorageController(context: AccountContext, focusOnItemTag: Da
|
||||
return storageUsageExceptionsScreen(context: context, category: category)
|
||||
}))
|
||||
}, openNetworkUsage: {
|
||||
//pushControllerImpl?(networkUsageStatsController(context: context))
|
||||
|
||||
let _ = (accountNetworkUsageStats(account: context.account, reset: [])
|
||||
|> take(1)
|
||||
|> deliverOnMainQueue).start(next: { stats in
|
||||
var stats = stats
|
||||
|
||||
if stats.resetWifiTimestamp == 0 {
|
||||
var value = stat()
|
||||
if stat(context.account.basePath, &value) == 0 {
|
||||
stats.resetWifiTimestamp = Int32(value.st_ctimespec.tv_sec)
|
||||
}
|
||||
}
|
||||
|
||||
pushControllerImpl?(DataUsageScreen(context: context, stats: stats))
|
||||
})
|
||||
}, openProxy: {
|
||||
|
||||
@@ -5,6 +5,7 @@ import Display
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import AccountContext
|
||||
import PasswordSetupUI
|
||||
|
||||
public protocol SettingsController: AnyObject {
|
||||
func updateContext(context: AccountContext)
|
||||
@@ -13,3 +14,14 @@ public protocol SettingsController: AnyObject {
|
||||
public func makePrivacyAndSecurityController(context: AccountContext) -> ViewController {
|
||||
return privacyAndSecurityController(context: context, focusOnItemTag: PrivacyAndSecurityEntryTag.autoArchive)
|
||||
}
|
||||
|
||||
public func makeSetupTwoFactorAuthController(context: AccountContext) -> ViewController {
|
||||
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
||||
let controller = TwoFactorAuthSplashScreen(sharedContext: context.sharedContext, engine: .authorized(context.engine), mode: .intro(.init(
|
||||
title: presentationData.strings.TwoFactorSetup_Intro_Title,
|
||||
text: presentationData.strings.TwoFactorSetup_Intro_Text,
|
||||
actionText: presentationData.strings.TwoFactorSetup_Intro_Action,
|
||||
doneText: presentationData.strings.TwoFactorSetup_Done_Action
|
||||
)))
|
||||
return controller
|
||||
}
|
||||
|
||||
@@ -222,7 +222,8 @@ private final class TextSizeSelectionControllerNode: ASDisplayNode, UIScrollView
|
||||
}, messageSelected: { _, _, _, _ in}, groupSelected: { _ in }, addContact: { _ in }, setPeerIdWithRevealedOptions: { _, _ in }, setItemPinned: { _, _ in }, setPeerMuted: { _, _ in }, setPeerThreadMuted: { _, _, _ in }, deletePeer: { _, _ in }, deletePeerThread: { _, _ in }, setPeerThreadStopped: { _, _, _ in }, setPeerThreadPinned: { _, _, _ in }, setPeerThreadHidden: { _, _, _ in }, updatePeerGrouping: { _, _ in }, togglePeerMarkedUnread: { _, _ in}, toggleArchivedFolderHiddenByDefault: {}, toggleThreadsSelection: { _, _ in }, hidePsa: { _ in
|
||||
}, activateChatPreview: { _, _, _, gesture, _ in
|
||||
gesture?.cancel()
|
||||
}, present: { _ in }, openForumThread: { _, _ in }, openStorageManagement: {})
|
||||
}, present: { _ in }, openForumThread: { _, _ in }, openStorageManagement: {}, openPasswordSetup: {
|
||||
})
|
||||
|
||||
let chatListPresentationData = ChatListPresentationData(theme: self.presentationData.theme, fontSize: self.presentationData.listsFontSize, strings: self.presentationData.strings, dateTimeFormat: self.presentationData.dateTimeFormat, nameSortOrder: self.presentationData.nameSortOrder, nameDisplayOrder: self.presentationData.nameDisplayOrder, disableAnimations: true)
|
||||
|
||||
|
||||
@@ -844,7 +844,8 @@ final class ThemeAccentColorControllerNode: ASDisplayNode, UIScrollViewDelegate
|
||||
gesture?.cancel()
|
||||
}, present: { _ in
|
||||
}, openForumThread: { _, _ in },
|
||||
openStorageManagement: {})
|
||||
openStorageManagement: {}, openPasswordSetup: {
|
||||
})
|
||||
let chatListPresentationData = ChatListPresentationData(theme: self.presentationData.theme, fontSize: self.presentationData.listsFontSize, strings: self.presentationData.strings, dateTimeFormat: self.presentationData.dateTimeFormat, nameSortOrder: self.presentationData.nameSortOrder, nameDisplayOrder: self.presentationData.nameDisplayOrder, disableAnimations: true)
|
||||
|
||||
func makeChatListItem(
|
||||
|
||||
@@ -367,7 +367,8 @@ final class ThemePreviewControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
}, activateChatPreview: { _, _, _, gesture, _ in
|
||||
gesture?.cancel()
|
||||
}, present: { _ in
|
||||
}, openForumThread: { _, _ in }, openStorageManagement: {})
|
||||
}, openForumThread: { _, _ in }, openStorageManagement: {}, openPasswordSetup: {
|
||||
})
|
||||
|
||||
func makeChatListItem(
|
||||
peer: EnginePeer,
|
||||
|
||||
Reference in New Issue
Block a user