mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Chat wallpaper improvements
This commit is contained in:
parent
ceb8619496
commit
4fec750fca
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user