Theming fixes

This commit is contained in:
Ilya Laktyushin
2019-12-21 03:53:26 +04:00
parent ad7e156466
commit e97d2ca981
17 changed files with 3647 additions and 3587 deletions

View File

@@ -164,9 +164,9 @@ func uploadCustomWallpaper(context: AccountContext, wallpaper: WallpaperGalleryE
}
let accentColor = current.themeSpecificAccentColors[themeReference.index]
if let accentColor = accentColor, accentColor.baseColor == .custom {
themeSpecificChatWallpapers[themeReference.index &+ Int64(accentColor.index)] = wallpaper
themeSpecificChatWallpapers[coloredThemeIndex(reference: themeReference, accentColor: accentColor)] = wallpaper
} else {
themeSpecificChatWallpapers[themeReference.index &+ Int64(accentColor?.index ?? 0)] = nil
themeSpecificChatWallpapers[coloredThemeIndex(reference: themeReference, accentColor: accentColor)] = nil
themeSpecificChatWallpapers[themeReference.index] = wallpaper
}
return current.withUpdatedThemeSpecificChatWallpapers(themeSpecificChatWallpapers)