Chat wallpaper improvements

This commit is contained in:
Ilya Laktyushin
2023-04-09 03:28:08 +04:00
parent ceb8619496
commit 4fec750fca
2 changed files with 7 additions and 3 deletions

View File

@@ -18559,7 +18559,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
strongSelf.themeEmoticonAndDarkAppearancePreviewPromise.set(.single((emoticon, dark)))
}
},
changeWallpaper: {
changeWallpaper: { [weak self] in
guard let strongSelf = self, let peerId else {
return
}
@@ -18631,6 +18631,9 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
guard let strongSelf = self, let peerId else {
return
}
if canResetWallpaper {
let _ = context.engine.themes.setChatWallpaper(peerId: peerId, wallpaper: nil).start()
}
strongSelf.themeEmoticonAndDarkAppearancePreviewPromise.set(.single((emoticon ?? "", nil)))
let _ = context.engine.themes.setChatTheme(peerId: peerId, emoticon: emoticon).start(completed: { [weak self] in
if let strongSelf = self {