From ad3147dbbfb90e48cdf29e2fe6335fb9ed59bbc8 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Wed, 6 May 2020 15:53:33 +0400 Subject: [PATCH] Don't show Calls tab by default --- submodules/TelegramUI/Sources/AppDelegate.swift | 2 -- .../Sources/CallListSettings.swift | 16 +--------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/submodules/TelegramUI/Sources/AppDelegate.swift b/submodules/TelegramUI/Sources/AppDelegate.swift index cffbe977ea..edc735e43c 100644 --- a/submodules/TelegramUI/Sources/AppDelegate.swift +++ b/submodules/TelegramUI/Sources/AppDelegate.swift @@ -1165,8 +1165,6 @@ final class SharedApplicationContext { self.registerForNotifications(context: context.context, authorize: authorizeNotifications) self.resetIntentsIfNeeded(context: context.context) - - let _ = storeCurrentCallListTabDefaultValue(accountManager: context.context.sharedContext.accountManager).start() })) } else { self.mainWindow.viewController = nil diff --git a/submodules/TelegramUIPreferences/Sources/CallListSettings.swift b/submodules/TelegramUIPreferences/Sources/CallListSettings.swift index 1a7640f660..991b7e6ddf 100644 --- a/submodules/TelegramUIPreferences/Sources/CallListSettings.swift +++ b/submodules/TelegramUIPreferences/Sources/CallListSettings.swift @@ -7,7 +7,7 @@ public struct CallListSettings: PreferencesEntry, Equatable { public var defaultShowTab: Bool? public static var defaultSettings: CallListSettings { - return CallListSettings(showTab: true) + return CallListSettings(showTab: false) } public var showTab: Bool { @@ -87,17 +87,3 @@ public func updateCallListSettingsInteractively(accountManager: AccountManager, }) } } - -public func storeCurrentCallListTabDefaultValue(accountManager: AccountManager) -> Signal { - return accountManager.transaction { transaction -> Void in - transaction.updateSharedData(ApplicationSpecificSharedDataKeys.callListSettings, { entry in - let currentSettings: CallListSettings - if let entry = entry as? CallListSettings { - currentSettings = entry - } else { - currentSettings = CallListSettings(showTab: nil, defaultShowTab: CallListSettings.defaultSettings.showTab) - } - return currentSettings - }) - } -}