Theme fixes

This commit is contained in:
Ilya Laktyushin 2019-12-28 02:30:49 +03:00
parent c5e6cb990a
commit 56f5299cc9
2 changed files with 9 additions and 0 deletions

View File

@ -367,6 +367,12 @@ public final class ThemePreviewController: ViewController {
updatedSettings = currentSettings.withUpdatedTheme(updatedTheme)
}
var themeSpecificAccentColors = updatedSettings.themeSpecificAccentColors
if case let .cloud(info) = updatedTheme, let settings = info.theme.settings {
let baseThemeReference = PresentationThemeReference.builtin(PresentationBuiltinThemeReference(baseTheme: settings.baseTheme))
themeSpecificAccentColors[baseThemeReference.index] = PresentationThemeAccentColor(themeIndex: updatedTheme.index)
}
var themeSpecificChatWallpapers = updatedSettings.themeSpecificChatWallpapers
themeSpecificChatWallpapers[updatedTheme.index] = nil
return updatedSettings.withUpdatedThemeSpecificChatWallpapers(themeSpecificChatWallpapers)

View File

@ -47,6 +47,9 @@ final class WallpaperGalleryToolbarNode: ASDisplayNode {
self.cancelButtonType = cancelButtonType
self.doneButtonType = doneButtonType
self.cancelHighlightBackgroundNode.alpha = 0.0
self.doneHighlightBackgroundNode.alpha = 0.0
super.init()
self.addSubnode(self.cancelHighlightBackgroundNode)