Various UI fixes

This commit is contained in:
Ilya Laktyushin
2019-09-02 21:30:09 +03:00
parent e4a472f246
commit 7d2e62fcce
85 changed files with 4488 additions and 4289 deletions

View File

@@ -934,7 +934,6 @@ public enum PresentationThemeName: Equatable {
public final class PresentationTheme: Equatable {
public let name: PresentationThemeName
public let author: String?
public let referenceTheme: PresentationBuiltinThemeReference
public let overallDarkAppearance: Bool
public let baseColor: PresentationThemeBaseColor?
@@ -951,9 +950,8 @@ public final class PresentationTheme: Equatable {
public let resourceCache: PresentationsResourceCache = PresentationsResourceCache()
public init(name: PresentationThemeName, author: String?, referenceTheme: PresentationBuiltinThemeReference, overallDarkAppearance: Bool, baseColor: PresentationThemeBaseColor?, intro: PresentationThemeIntro, passcode: PresentationThemePasscode, rootController: PresentationThemeRootController, list: PresentationThemeList, chatList: PresentationThemeChatList, chat: PresentationThemeChat, actionSheet: PresentationThemeActionSheet, contextMenu: PresentationThemeContextMenu, inAppNotification: PresentationThemeInAppNotification, preview: Bool = false) {
public init(name: PresentationThemeName, referenceTheme: PresentationBuiltinThemeReference, overallDarkAppearance: Bool, baseColor: PresentationThemeBaseColor?, intro: PresentationThemeIntro, passcode: PresentationThemePasscode, rootController: PresentationThemeRootController, list: PresentationThemeList, chatList: PresentationThemeChatList, chat: PresentationThemeChat, actionSheet: PresentationThemeActionSheet, contextMenu: PresentationThemeContextMenu, inAppNotification: PresentationThemeInAppNotification, preview: Bool = false) {
self.name = name
self.author = author
self.referenceTheme = referenceTheme
self.overallDarkAppearance = overallDarkAppearance
self.baseColor = baseColor
@@ -981,7 +979,7 @@ public final class PresentationTheme: Equatable {
return lhs === rhs
}
public func withUpdated(name: String?, author: String?, defaultWallpaper: TelegramWallpaper?) -> PresentationTheme {
public func withUpdated(name: String?, defaultWallpaper: TelegramWallpaper?) -> PresentationTheme {
var defaultWallpaper = defaultWallpaper
if let wallpaper = defaultWallpaper {
switch wallpaper {
@@ -995,6 +993,6 @@ public final class PresentationTheme: Equatable {
break
}
}
return PresentationTheme(name: name.flatMap(PresentationThemeName.custom) ?? .custom(self.name.string), author: author ?? self.author, referenceTheme: self.referenceTheme, overallDarkAppearance: self.overallDarkAppearance, baseColor: nil, intro: self.intro, passcode: self.passcode, rootController: self.rootController, list: self.list, chatList: self.chatList, chat: self.chat.withUpdatedDefaultWallpaper(defaultWallpaper), actionSheet: self.actionSheet, contextMenu: self.contextMenu, inAppNotification: self.inAppNotification)
return PresentationTheme(name: name.flatMap(PresentationThemeName.custom) ?? .custom(self.name.string), referenceTheme: self.referenceTheme, overallDarkAppearance: self.overallDarkAppearance, baseColor: nil, intro: self.intro, passcode: self.passcode, rootController: self.rootController, list: self.list, chatList: self.chatList, chat: self.chat.withUpdatedDefaultWallpaper(defaultWallpaper), actionSheet: self.actionSheet, contextMenu: self.contextMenu, inAppNotification: self.inAppNotification)
}
}