mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-03 13:13:55 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
cbd7b5d106
@ -470,7 +470,7 @@ final class ThemeAccentColorController: ViewController {
|
||||
} else if let customWallpaper = settings.themeSpecificChatWallpapers[themeReference.index] {
|
||||
wallpaper = customWallpaper
|
||||
} else {
|
||||
let theme = makePresentationTheme(mediaBox: strongSelf.context.sharedContext.accountManager.mediaBox, themeReference: themeReference, accentColor: themeSpecificAccentColor?.color, wallpaper: themeSpecificAccentColor?.wallpaper) ?? defaultPresentationTheme
|
||||
let theme = makePresentationTheme(mediaBox: strongSelf.context.sharedContext.accountManager.mediaBox, themeReference: themeReference, accentColor: themeSpecificAccentColor?.color, wallpaper: themeSpecificAccentColor?.wallpaper, wallpaperGradientColors: themeSpecificAccentColor?.baseColor.wallpaperGradientColors) ?? defaultPresentationTheme
|
||||
referenceTheme = theme
|
||||
wallpaper = theme.chat.defaultWallpaper
|
||||
}
|
||||
|
||||
@ -1047,10 +1047,15 @@ public func themeSettingsController(context: AccountContext, focusOnItemTag: The
|
||||
|
||||
var defaultThemes: [PresentationThemeReference] = []
|
||||
if presentationData.autoNightModeTriggered {
|
||||
defaultThemes.append(contentsOf: [.builtin(.nightAccent), .builtin(.night)])
|
||||
} else {
|
||||
defaultThemes.append(contentsOf: [.builtin(.dayClassic), .builtin(.day)])
|
||||
defaultThemes.append(contentsOf: [
|
||||
.builtin(.dayClassic),
|
||||
.builtin(.nightAccent),
|
||||
.builtin(.day),
|
||||
.builtin(.night)
|
||||
])
|
||||
}
|
||||
defaultThemes.append(contentsOf: [.builtin(.night), .builtin(.nightAccent)])
|
||||
|
||||
let cloudThemes: [PresentationThemeReference] = cloudThemes.map { .cloud(PresentationCloudTheme(theme: $0, resolvedWallpaper: nil, creatorAccountId: $0.isCreator ? context.account.id : nil)) }.filter { !removedThemeIndexes.contains($0.index) }
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user