Fix theme setup from grid

This commit is contained in:
Ilya Laktyushin 2021-10-18 18:04:55 +04:00
parent 48a0cde7dc
commit f5a9ee101a

View File

@ -352,7 +352,9 @@ public final class ThemePreviewController: ViewController {
|> mapToSignal { updatedTheme, existing -> Signal<(PresentationThemeReference, PresentationThemeAccentColor?, Bool, PresentationThemeReference, Bool)?, NoError> in
if case let .cloud(info) = updatedTheme {
let _ = applyTheme(accountManager: context.sharedContext.accountManager, account: context.account, theme: info.theme).start()
let _ = saveThemeInteractively(account: context.account, accountManager: context.sharedContext.accountManager, theme: info.theme).start()
if info.theme.emoticon == nil {
let _ = saveThemeInteractively(account: context.account, accountManager: context.sharedContext.accountManager, theme: info.theme).start()
}
}
let autoNightModeTriggered = context.sharedContext.currentPresentationData.with { $0 }.autoNightModeTriggered