Fixed theme not switching in auto-night settings controller when changing preferred night theme

This commit is contained in:
Ilya Laktyushin 2019-05-29 16:13:06 +02:00
parent f97d8cfb30
commit dbd0004c66

View File

@ -509,8 +509,7 @@ public func themeAutoNightSettingsController(context: AccountContext) -> ViewCon
}
})
let signal = combineLatest(context.sharedContext.presentationData, sharedData, stagingSettingsPromise.get())
|> deliverOnMainQueue
let signal = combineLatest(context.sharedContext.presentationData |> deliverOnMainQueue, sharedData |> deliverOnMainQueue, stagingSettingsPromise.get() |> deliverOnMainQueue)
|> map { presentationData, sharedData, stagingSettings -> (ItemListControllerState, (ItemListNodeState<ThemeAutoNightSettingsControllerEntry>, ThemeAutoNightSettingsControllerEntry.ItemGenerationArguments)) in
let settings = (sharedData.entries[ApplicationSpecificSharedDataKeys.presentationThemeSettings] as? PresentationThemeSettings) ?? PresentationThemeSettings.defaultSettings