mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 11:50:56 +00:00
Merge commit 'dc7daf94314c5d1e1214db62b7fc479c60e0ef88'
This commit is contained in:
commit
5f6386b4bd
@ -925,7 +925,15 @@ private class ChatQrCodeScreenNode: ViewControllerTracingNode, UIScrollViewDeleg
|
|||||||
let presentationData = strongSelf.presentationData
|
let presentationData = strongSelf.presentationData
|
||||||
|
|
||||||
var entries: [ThemeSettingsThemeEntry] = []
|
var entries: [ThemeSettingsThemeEntry] = []
|
||||||
entries.append(ThemeSettingsThemeEntry(index: 0, emoticon: defaultEmoticon, emojiFile: animatedEmojiStickers[defaultEmoticon]?.first?.file, themeReference: .builtin(isDarkAppearance ? .night : .dayClassic), nightMode: isDarkAppearance, selected: selectedEmoticon == defaultEmoticon, theme: presentationData.theme, strings: presentationData.strings, wallpaper: nil))
|
|
||||||
|
let defaultWallpaper: TelegramWallpaper?
|
||||||
|
if isDarkAppearance {
|
||||||
|
let dayTheme = makeDefaultPresentationTheme(reference: .dayClassic, serviceBackgroundColor: nil)
|
||||||
|
defaultWallpaper = dayTheme.chat.defaultWallpaper.withUpdatedSettings(WallpaperSettings(blur: false, motion: false, colors: [0x00b3dd, 0x3b59f2, 0x358be2, 0xa434cf], intensity: -55, rotation: nil))
|
||||||
|
} else {
|
||||||
|
defaultWallpaper = nil
|
||||||
|
}
|
||||||
|
entries.append(ThemeSettingsThemeEntry(index: 0, emoticon: defaultEmoticon, emojiFile: animatedEmojiStickers[defaultEmoticon]?.first?.file, themeReference: .builtin(isDarkAppearance ? .night : .dayClassic), nightMode: isDarkAppearance, selected: selectedEmoticon == defaultEmoticon, theme: presentationData.theme, strings: presentationData.strings, wallpaper: defaultWallpaper))
|
||||||
for theme in themes {
|
for theme in themes {
|
||||||
guard let emoticon = theme.emoticon else {
|
guard let emoticon = theme.emoticon else {
|
||||||
continue
|
continue
|
||||||
@ -936,7 +944,11 @@ private class ChatQrCodeScreenNode: ViewControllerTracingNode, UIScrollViewDeleg
|
|||||||
let wallpaper: TelegramWallpaper
|
let wallpaper: TelegramWallpaper
|
||||||
if selectedEmoticon == defaultEmoticon {
|
if selectedEmoticon == defaultEmoticon {
|
||||||
let presentationTheme = makeDefaultPresentationTheme(reference: isDarkAppearance ? .night : .dayClassic, serviceBackgroundColor: nil)
|
let presentationTheme = makeDefaultPresentationTheme(reference: isDarkAppearance ? .night : .dayClassic, serviceBackgroundColor: nil)
|
||||||
|
if isDarkAppearance {
|
||||||
|
wallpaper = entries.first?.wallpaper ?? .color(0x000000)
|
||||||
|
} else {
|
||||||
wallpaper = presentationTheme.chat.defaultWallpaper
|
wallpaper = presentationTheme.chat.defaultWallpaper
|
||||||
|
}
|
||||||
} else if let theme = themes.first(where: { $0.emoticon == selectedEmoticon }), let presentationTheme = makePresentationTheme(cloudTheme: theme, dark: isDarkAppearance) {
|
} else if let theme = themes.first(where: { $0.emoticon == selectedEmoticon }), let presentationTheme = makePresentationTheme(cloudTheme: theme, dark: isDarkAppearance) {
|
||||||
wallpaper = presentationTheme.chat.defaultWallpaper
|
wallpaper = presentationTheme.chat.defaultWallpaper
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user