mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Chat wallpaper fixes
This commit is contained in:
parent
32251e1ef2
commit
e64d88916d
@ -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.";
|
||||
|
@ -451,6 +451,7 @@ private final class MainButtonNode: HighlightTrackingButtonNode {
|
||||
|
||||
super.init(pointerStyle: pointerStyle)
|
||||
|
||||
self.isExclusiveTouch = true
|
||||
self.clipsToBounds = true
|
||||
|
||||
self.addSubnode(self.backgroundAnimationNode)
|
||||
|
@ -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]
|
||||
|
@ -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)
|
||||
|
@ -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):
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
}))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user