Various fixes

This commit is contained in:
Ilya Laktyushin 2023-11-27 23:49:48 +04:00
parent fc5c2ad154
commit 0d0c8186c4

View File

@ -157,9 +157,9 @@ final class ThemeColorsGridControllerNode: ASDisplayNode {
}
controller.navigationPresentation = .modal
controller.apply = { [weak self] wallpaper, _, _, _, _, _ in
controller.apply = { [weak self] wallpaper, _, _, _, _, forBoth in
if let strongSelf = self, let mode = strongSelf.controller?.mode, case let .peer(peer) = mode, case let .wallpaper(wallpaperValue, _) = wallpaper {
let _ = (strongSelf.context.engine.themes.setChatWallpaper(peerId: peer.id, wallpaper: wallpaperValue, forBoth: false)
let _ = (strongSelf.context.engine.themes.setChatWallpaper(peerId: peer.id, wallpaper: wallpaperValue, forBoth: forBoth)
|> deliverOnMainQueue).start(completed: {
dismissControllers()
})