mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
Reset custom bubble color when picking one of default accent colors
This commit is contained in:
parent
0f081f9ac3
commit
2e57a88b05
@ -454,14 +454,16 @@ public func themeSettingsController(context: AccountContext, focusOnItemTag: The
|
|||||||
|
|
||||||
var themeSpecificChatWallpapers = current.themeSpecificChatWallpapers
|
var themeSpecificChatWallpapers = current.themeSpecificChatWallpapers
|
||||||
var themeSpecificAccentColors = current.themeSpecificAccentColors
|
var themeSpecificAccentColors = current.themeSpecificAccentColors
|
||||||
|
var themeSpecificBubbleColors = current.themeSpecificBubbleColors
|
||||||
themeSpecificAccentColors[currentTheme.index] = color
|
themeSpecificAccentColors[currentTheme.index] = color
|
||||||
|
themeSpecificBubbleColors[currentTheme.index] = nil
|
||||||
|
|
||||||
if let wallpaper = current.themeSpecificChatWallpapers[currentTheme.index], wallpaper.hasWallpaper {
|
if let wallpaper = current.themeSpecificChatWallpapers[currentTheme.index], wallpaper.hasWallpaper {
|
||||||
} else {
|
} else {
|
||||||
themeSpecificChatWallpapers[currentTheme.index] = theme.chat.defaultWallpaper
|
themeSpecificChatWallpapers[currentTheme.index] = theme.chat.defaultWallpaper
|
||||||
}
|
}
|
||||||
|
|
||||||
return PresentationThemeSettings(theme: current.theme, themeSpecificAccentColors: themeSpecificAccentColors, themeSpecificBubbleColors: current.themeSpecificBubbleColors, themeSpecificChatWallpapers: themeSpecificChatWallpapers, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations)
|
return PresentationThemeSettings(theme: current.theme, themeSpecificAccentColors: themeSpecificAccentColors, themeSpecificBubbleColors: themeSpecificBubbleColors, themeSpecificChatWallpapers: themeSpecificChatWallpapers, fontSize: current.fontSize, automaticThemeSwitchSetting: current.automaticThemeSwitchSetting, largeEmoji: current.largeEmoji, disableAnimations: current.disableAnimations)
|
||||||
}).start()
|
}).start()
|
||||||
}, openAccentColorPicker: { themeReference in
|
}, openAccentColorPicker: { themeReference in
|
||||||
let controller = ThemeAccentColorController(context: context, themeReference: themeReference, section: .accent)
|
let controller = ThemeAccentColorController(context: context, themeReference: themeReference, section: .accent)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user