mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Refactoring
This commit is contained in:
@@ -125,14 +125,14 @@ func voiceCallDataSavingController(context: AccountContext) -> ViewController {
|
||||
let sharedSettings = context.sharedContext.accountManager.sharedData(keys: [ApplicationSpecificSharedDataKeys.voiceCallSettings])
|
||||
|> map { sharedData -> (VoiceCallSettings, AutodownloadSettings) in
|
||||
let voiceCallSettings: VoiceCallSettings
|
||||
if let value = sharedData.entries[ApplicationSpecificSharedDataKeys.voiceCallSettings] as? VoiceCallSettings {
|
||||
if let value = sharedData.entries[ApplicationSpecificSharedDataKeys.voiceCallSettings]?.get(VoiceCallSettings.self) {
|
||||
voiceCallSettings = value
|
||||
} else {
|
||||
voiceCallSettings = VoiceCallSettings.defaultSettings
|
||||
}
|
||||
|
||||
let autodownloadSettings: AutodownloadSettings
|
||||
if let value = sharedData.entries[SharedDataKeys.autodownloadSettings] as? AutodownloadSettings {
|
||||
if let value = sharedData.entries[SharedDataKeys.autodownloadSettings]?.get(AutodownloadSettings.self) {
|
||||
autodownloadSettings = value
|
||||
} else {
|
||||
autodownloadSettings = AutodownloadSettings.defaultSettings
|
||||
|
||||
Reference in New Issue
Block a user