mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Various fixes
This commit is contained in:
@@ -158,7 +158,7 @@ final class ThemeAccentColorController: ViewController {
|
||||
if let strongSelf = self {
|
||||
strongSelf.dismiss()
|
||||
}
|
||||
}, apply: { [weak self] state, serviceBackgroundColor in
|
||||
}, apply: { [weak self] state, serviceBackgroundColor, forBoth in
|
||||
if let strongSelf = self {
|
||||
let context = strongSelf.context
|
||||
let autoNightModeTriggered = strongSelf.presentationData.autoNightModeTriggered
|
||||
@@ -175,7 +175,7 @@ final class ThemeAccentColorController: ViewController {
|
||||
}
|
||||
|
||||
if case let .peer(peer) = strongSelf.resultMode {
|
||||
let _ = strongSelf.context.engine.themes.setChatWallpaper(peerId: peer.id, wallpaper: coloredWallpaper, forBoth: false).start()
|
||||
let _ = strongSelf.context.engine.themes.setChatWallpaper(peerId: peer.id, wallpaper: coloredWallpaper, forBoth: forBoth).start()
|
||||
strongSelf.completion?()
|
||||
return
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ final class ThemeAccentColorControllerNode: ASDisplayNode, UIScrollViewDelegate
|
||||
}
|
||||
}
|
||||
|
||||
init(context: AccountContext, mode: ThemeAccentColorControllerMode, resultMode: ThemeAccentColorController.ResultMode, theme: PresentationTheme, wallpaper: TelegramWallpaper, dismiss: @escaping () -> Void, apply: @escaping (ThemeColorState, UIColor?) -> Void, ready: Promise<Bool>) {
|
||||
init(context: AccountContext, mode: ThemeAccentColorControllerMode, resultMode: ThemeAccentColorController.ResultMode, theme: PresentationTheme, wallpaper: TelegramWallpaper, dismiss: @escaping () -> Void, apply: @escaping (ThemeColorState, UIColor?, Bool) -> Void, ready: Promise<Bool>) {
|
||||
self.context = context
|
||||
self.mode = mode
|
||||
self.resultMode = resultMode
|
||||
@@ -437,7 +437,7 @@ final class ThemeAccentColorControllerNode: ASDisplayNode, UIScrollViewDelegate
|
||||
}
|
||||
}
|
||||
|
||||
self.toolbarNode.done = { [weak self] _ in
|
||||
self.toolbarNode.done = { [weak self] forBoth in
|
||||
if let strongSelf = self {
|
||||
if strongSelf.state.displayPatternPanel {
|
||||
strongSelf.updateState({ current in
|
||||
@@ -448,7 +448,7 @@ final class ThemeAccentColorControllerNode: ASDisplayNode, UIScrollViewDelegate
|
||||
} else {
|
||||
if !strongSelf.dismissed {
|
||||
strongSelf.dismissed = true
|
||||
apply(strongSelf.state, strongSelf.serviceBackgroundColor)
|
||||
apply(strongSelf.state, strongSelf.serviceBackgroundColor, forBoth)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user