diff --git a/submodules/SettingsUI/Sources/Themes/WallpaperGalleryItem.swift b/submodules/SettingsUI/Sources/Themes/WallpaperGalleryItem.swift index f7eb64d7d6..5ac30c5814 100644 --- a/submodules/SettingsUI/Sources/Themes/WallpaperGalleryItem.swift +++ b/submodules/SettingsUI/Sources/Themes/WallpaperGalleryItem.swift @@ -177,6 +177,7 @@ final class WallpaperGalleryItemNode: GalleryItemNode { self.patternButtonNode.setEnabled(false) self.serviceBackgroundNode = NavigationBackgroundNode(color: UIColor(rgb: 0x333333, alpha: 0.33)) + self.serviceBackgroundNode.isHidden = true var sliderValueChangedImpl: ((CGFloat) -> Void)? self.sliderNode = WallpaperSliderNode(minValue: 0.0, maxValue: 1.0, value: 0.7, valueChanged: { value, _ in @@ -627,6 +628,7 @@ final class WallpaperGalleryItemNode: GalleryItemNode { colorSignal = .single(UIColor(rgb: 0x000000, alpha: 0.3)) self.wrapperNode.addSubnode(self.cropNode) showPreviewTooltip = true + self.serviceBackgroundNode.isHidden = false case let .contextResult(result): var imageDimensions: CGSize? var imageResource: TelegramMediaResource? @@ -682,11 +684,10 @@ final class WallpaperGalleryItemNode: GalleryItemNode { subtitleSignal = .single(nil) self.wrapperNode.addSubnode(self.cropNode) showPreviewTooltip = true + self.serviceBackgroundNode.isHidden = false } self.contentSize = contentSize - //self.cancelButtonNode.dark = !isEditable - //self.shareButtonNode.dark = !isEditable self.shareButtonNode.isHidden = !canShare if self.cropNode.supernode == nil { diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index d7eb301bc4..301c4bee33 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -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 {