diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index 49d73708e2..d3c26358da 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -9318,3 +9318,8 @@ Sorry for the inconvenience."; "FolderLinkPreview.ListSelectionSelectAllStaticPartSelect" = "ALL"; "FolderLinkPreview.ListSelectionSelectAllStaticPartDeselect" = "ALL"; "FolderLinkPreview.ListSelectionSelectAllFormat" = "{dynamic}{static}"; + +"UserInfo.ChangeWallpaper" = "Change Wallpaper"; + +"Conversation.Theme.PreviewDarkShort" = "Tap to view this theme in the night mode."; +"Conversation.Theme.PreviewLightShort" = "Tap to view this theme in the day mode."; diff --git a/submodules/AttachmentUI/Sources/AttachmentPanel.swift b/submodules/AttachmentUI/Sources/AttachmentPanel.swift index 18b04c5803..e62157c939 100644 --- a/submodules/AttachmentUI/Sources/AttachmentPanel.swift +++ b/submodules/AttachmentUI/Sources/AttachmentPanel.swift @@ -451,6 +451,7 @@ private final class MainButtonNode: HighlightTrackingButtonNode { super.init(pointerStyle: pointerStyle) + self.isExclusiveTouch = true self.clipsToBounds = true self.addSubnode(self.backgroundAnimationNode) diff --git a/submodules/SettingsUI/Sources/Themes/WallpaperGalleryController.swift b/submodules/SettingsUI/Sources/Themes/WallpaperGalleryController.swift index 5352a07f7a..2fa114ef65 100644 --- a/submodules/SettingsUI/Sources/Themes/WallpaperGalleryController.swift +++ b/submodules/SettingsUI/Sources/Themes/WallpaperGalleryController.swift @@ -515,8 +515,11 @@ public class WallpaperGalleryController: ViewController { var dismissed = false toolbarNode.done = { [weak self] in if let strongSelf = self, !dismissed { - dismissed = true if let centralItemNode = strongSelf.galleryNode.pager.centralItemNode() as? WallpaperGalleryItemNode { + if centralItemNode.cropNode.scrollNode.view.isDecelerating { + return + } + dismissed = true let options = centralItemNode.options if !strongSelf.entries.isEmpty { let entry = strongSelf.entries[centralItemNode.index] diff --git a/submodules/SettingsUI/Sources/Themes/WallpaperGalleryToolbarNode.swift b/submodules/SettingsUI/Sources/Themes/WallpaperGalleryToolbarNode.swift index af9b56b74b..52ed12bfe9 100644 --- a/submodules/SettingsUI/Sources/Themes/WallpaperGalleryToolbarNode.swift +++ b/submodules/SettingsUI/Sources/Themes/WallpaperGalleryToolbarNode.swift @@ -87,6 +87,8 @@ final class WallpaperGalleryToolbarNode: ASDisplayNode { self.doneButtonSolidTitleNode.isUserInteractionEnabled = false super.init() + + self.doneButton.isExclusiveTouch = true self.addSubnode(self.doneButtonBackgroundNode) self.addSubnode(self.doneButtonTitleNode) diff --git a/submodules/SettingsUI/Sources/Themes/WallpaperOptionButtonNode.swift b/submodules/SettingsUI/Sources/Themes/WallpaperOptionButtonNode.swift index beebc7850e..444e2382b1 100644 --- a/submodules/SettingsUI/Sources/Themes/WallpaperOptionButtonNode.swift +++ b/submodules/SettingsUI/Sources/Themes/WallpaperOptionButtonNode.swift @@ -170,6 +170,8 @@ final class WallpaperNavigationButtonNode: HighlightTrackingButtonNode { super.init() + self.isExclusiveTouch = true + self.addSubnode(self.backgroundNode) self.addSubnode(self.iconNode) self.addSubnode(self.textNode) @@ -320,6 +322,7 @@ final class WallpaperOptionButtonNode: HighlightTrackingButtonNode { self.clipsToBounds = true self.cornerRadius = 14.0 + self.isExclusiveTouch = true switch value { case let .check(selected): diff --git a/submodules/TelegramUI/Sources/ChatMessageNotificationItem.swift b/submodules/TelegramUI/Sources/ChatMessageNotificationItem.swift index 311ab53b93..4e6047bd58 100644 --- a/submodules/TelegramUI/Sources/ChatMessageNotificationItem.swift +++ b/submodules/TelegramUI/Sources/ChatMessageNotificationItem.swift @@ -314,8 +314,17 @@ final class ChatMessageNotificationItemNode: NotificationItemNode { title = "📅 \(currentTitle)" } - if let attribute = item.messages.first?.attributes.first(where: { $0 is NotificationInfoMessageAttribute }) as? NotificationInfoMessageAttribute, attribute.flags.contains(.muted), let currentTitle = title { - title = "\(currentTitle) 🔕" + if let message, item.messages.first, let attribute = message.attributes.first(where: { $0 is NotificationInfoMessageAttribute }) as? NotificationInfoMessageAttribute, attribute.flags.contains(.muted), let currentTitle = title { + var isAction = false + for media in message.media { + if media is TelegramMediaAction { + isAction = true + break + } + } + if !isAction { + title = "\(currentTitle) 🔕" + } } let textFont = compact ? Font.regular(15.0) : Font.regular(16.0) diff --git a/submodules/TelegramUI/Sources/ChatThemeScreen.swift b/submodules/TelegramUI/Sources/ChatThemeScreen.swift index bb157f8e4a..f53617080e 100644 --- a/submodules/TelegramUI/Sources/ChatThemeScreen.swift +++ b/submodules/TelegramUI/Sources/ChatThemeScreen.swift @@ -1261,7 +1261,7 @@ private class ChatThemeScreenNode: ViewControllerTracingNode, UIScrollViewDelega if let strongSelf = self, count < 2 && currentTimestamp > timestamp + 24 * 60 * 60 { strongSelf.displayedPreviewTooltip = true - strongSelf.present?(TooltipScreen(account: strongSelf.context.account, sharedContext: strongSelf.context.sharedContext, text: isDark ? strongSelf.presentationData.strings.Conversation_Theme_PreviewLight(strongSelf.peerName).string : strongSelf.presentationData.strings.Conversation_Theme_PreviewDark(strongSelf.peerName).string, style: .default, icon: nil, location: .point(frame.offsetBy(dx: 3.0, dy: 6.0), .bottom), displayDuration: .custom(3.0), inset: 3.0, shouldDismissOnTouch: { _ in + strongSelf.present?(TooltipScreen(account: strongSelf.context.account, sharedContext: strongSelf.context.sharedContext, text: isDark ? strongSelf.presentationData.strings.Conversation_Theme_PreviewLightShort : strongSelf.presentationData.strings.Conversation_Theme_PreviewDarkShort, style: .default, icon: nil, location: .point(frame.offsetBy(dx: 3.0, dy: 6.0), .bottom), displayDuration: .custom(3.0), inset: 3.0, shouldDismissOnTouch: { _ in return .dismiss(consume: false) }))