Chat wallpaper improvements

This commit is contained in:
Ilya Laktyushin 2023-04-13 21:06:27 +04:00
parent e8f197d9e8
commit 790343efa8
3 changed files with 7 additions and 1 deletions

View File

@ -9154,6 +9154,7 @@ Sorry for the inconvenience.";
"WallpaperPreview.ChatBottomText" = "Enjoy the view."; "WallpaperPreview.ChatBottomText" = "Enjoy the view.";
"Conversation.Theme.SetPhotoWallpaper" = "Choose Wallpaper from Photos"; "Conversation.Theme.SetPhotoWallpaper" = "Choose Wallpaper from Photos";
"Conversation.Theme.SetNewPhotoWallpaper" = "Choose a New Wallpaper";
"Conversation.Theme.SetColorWallpaper" = "Set a Color as Wallpaper"; "Conversation.Theme.SetColorWallpaper" = "Set a Color as Wallpaper";
"Conversation.Theme.ChooseWallpaperTitle" = "Choose Wallpaper"; "Conversation.Theme.ChooseWallpaperTitle" = "Choose Wallpaper";

View File

@ -219,6 +219,11 @@ final class WallpaperNavigationButtonNode: HighlightTrackingButtonNode {
self.animationNode?.setAnimation(name: !isNight ? "anim_sun_reverse" : "anim_sun", colors: [:]) self.animationNode?.setAnimation(name: !isNight ? "anim_sun_reverse" : "anim_sun", colors: [:])
self.animationNode?.speed = 1.66 self.animationNode?.speed = 1.66
self.animationNode?.playOnce() self.animationNode?.playOnce()
self.isUserInteractionEnabled = false
Queue.mainQueue().after(0.4) {
self.isUserInteractionEnabled = true
}
} }
var buttonColor: UIColor = UIColor(rgb: 0x000000, alpha: 0.3) { var buttonColor: UIColor = UIColor(rgb: 0x000000, alpha: 0.3) {

View File

@ -1015,8 +1015,8 @@ private class ChatThemeScreenNode: ViewControllerTracingNode, UIScrollViewDelega
var accentButtonTheme = true var accentButtonTheme = true
var otherIsEnabled = false var otherIsEnabled = false
if self.selectedEmoticon?.strippedEmoji == self.initiallySelectedEmoticon?.strippedEmoji { if self.selectedEmoticon?.strippedEmoji == self.initiallySelectedEmoticon?.strippedEmoji {
doneButtonTitle = self.presentationData.strings.Conversation_Theme_SetPhotoWallpaper
otherIsEnabled = self.controller?.canResetWallpaper == true otherIsEnabled = self.controller?.canResetWallpaper == true
doneButtonTitle = otherIsEnabled ? self.presentationData.strings.Conversation_Theme_SetNewPhotoWallpaper : self.presentationData.strings.Conversation_Theme_SetPhotoWallpaper
accentButtonTheme = false accentButtonTheme = false
} else if self.selectedEmoticon == nil && self.initiallySelectedEmoticon != nil { } else if self.selectedEmoticon == nil && self.initiallySelectedEmoticon != nil {
doneButtonTitle = self.presentationData.strings.Conversation_Theme_Reset doneButtonTitle = self.presentationData.strings.Conversation_Theme_Reset