diff --git a/submodules/ChatListUI/Sources/Node/ChatListHoleItem.swift b/submodules/ChatListUI/Sources/Node/ChatListHoleItem.swift index 4434f59e2f..1716677a87 100644 --- a/submodules/ChatListUI/Sources/Node/ChatListHoleItem.swift +++ b/submodules/ChatListUI/Sources/Node/ChatListHoleItem.swift @@ -191,6 +191,14 @@ class ChatListSearchEmptyFooterItemNode: ListViewItemNode { self.contentNode.frame = contentFrame } + override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { + let result = super.hitTest(point, with: event) + if let contentResult = self.contentNode.view.hitTest(self.view.convert(point, to: self.contentNode.view), with: event), contentResult === self.searchAllMessagesButton.view { + return contentResult + } + return result + } + func asyncLayout() -> (_ item: ChatListSearchEmptyFooterItem, _ params: ListViewItemLayoutParams) -> (ListViewItemNodeLayout, () -> Void) { let makeTitleNodeLayout = TextNode.asyncLayout(self.titleNode) let makeTextNodeLayout = TextNode.asyncLayout(self.textNode) diff --git a/submodules/Components/ReactionButtonListComponent/Sources/ReactionButtonListComponent.swift b/submodules/Components/ReactionButtonListComponent/Sources/ReactionButtonListComponent.swift index 9b450ce4ac..ce867a96d1 100644 --- a/submodules/Components/ReactionButtonListComponent/Sources/ReactionButtonListComponent.swift +++ b/submodules/Components/ReactionButtonListComponent/Sources/ReactionButtonListComponent.swift @@ -1225,7 +1225,9 @@ public final class ReactionButtonAsyncNode: ContextControllerSourceView { let tintColor: UIColor if layout.backgroundLayout.colors.isSelected { - if layout.spec.component.colors.selectedForeground != 0 { + if layout.spec.component.colors.selectedIconTintColor != 0 { + tintColor = UIColor(argb: layout.spec.component.colors.selectedIconTintColor) + } else if layout.spec.component.colors.selectedForeground != 0 { tintColor = UIColor(argb: layout.spec.component.colors.selectedForeground) } else { tintColor = .white @@ -1352,6 +1354,7 @@ public final class ReactionButtonComponent: Equatable { public var selectedBackground: UInt32 public var deselectedForeground: UInt32 public var selectedForeground: UInt32 + public var selectedIconTintColor: UInt32 public var deselectedStarsBackground: UInt32 public var selectedStarsBackground: UInt32 public var deselectedStarsForeground: UInt32 @@ -1367,6 +1370,7 @@ public final class ReactionButtonComponent: Equatable { selectedBackground: UInt32, deselectedForeground: UInt32, selectedForeground: UInt32, + selectedIconTintColor: UInt32, deselectedStarsBackground: UInt32, selectedStarsBackground: UInt32, deselectedStarsForeground: UInt32, @@ -1381,6 +1385,7 @@ public final class ReactionButtonComponent: Equatable { self.selectedBackground = selectedBackground self.deselectedForeground = deselectedForeground self.selectedForeground = selectedForeground + self.selectedIconTintColor = selectedIconTintColor self.deselectedStarsBackground = deselectedStarsBackground self.selectedStarsBackground = selectedStarsBackground self.deselectedStarsForeground = deselectedStarsForeground diff --git a/submodules/ContextUI/Sources/ContextController.swift b/submodules/ContextUI/Sources/ContextController.swift index dbcab9d1ea..fd8b12acdd 100644 --- a/submodules/ContextUI/Sources/ContextController.swift +++ b/submodules/ContextUI/Sources/ContextController.swift @@ -2490,6 +2490,7 @@ public final class ContextController: ViewController, StandalonePresentableContr public var immediateItemsTransitionAnimation = false let workaroundUseLegacyImplementation: Bool let disableScreenshots: Bool + let hideReactionPanelTail: Bool public enum HandledTouchEvent { case ignore @@ -2505,7 +2506,7 @@ public final class ContextController: ViewController, StandalonePresentableContr public var getOverlayViews: (() -> [UIView])? - convenience public init(context: AccountContext? = nil, presentationData: PresentationData, source: ContextContentSource, items: Signal, recognizer: TapLongTapOrDoubleTapGestureRecognizer? = nil, gesture: ContextGesture? = nil, workaroundUseLegacyImplementation: Bool = false, disableScreenshots: Bool = false) { + convenience public init(context: AccountContext? = nil, presentationData: PresentationData, source: ContextContentSource, items: Signal, recognizer: TapLongTapOrDoubleTapGestureRecognizer? = nil, gesture: ContextGesture? = nil, workaroundUseLegacyImplementation: Bool = false, disableScreenshots: Bool = false, hideReactionPanelTail: Bool = false) { self.init( context: context, presentationData: presentationData, @@ -2521,7 +2522,8 @@ public final class ContextController: ViewController, StandalonePresentableContr recognizer: recognizer, gesture: gesture, workaroundUseLegacyImplementation: workaroundUseLegacyImplementation, - disableScreenshots: disableScreenshots + disableScreenshots: disableScreenshots, + hideReactionPanelTail: hideReactionPanelTail ) } @@ -2532,7 +2534,8 @@ public final class ContextController: ViewController, StandalonePresentableContr recognizer: TapLongTapOrDoubleTapGestureRecognizer? = nil, gesture: ContextGesture? = nil, workaroundUseLegacyImplementation: Bool = false, - disableScreenshots: Bool = false + disableScreenshots: Bool = false, + hideReactionPanelTail: Bool = false ) { self.context = context self.presentationData = presentationData @@ -2541,6 +2544,7 @@ public final class ContextController: ViewController, StandalonePresentableContr self.gesture = gesture self.workaroundUseLegacyImplementation = workaroundUseLegacyImplementation self.disableScreenshots = disableScreenshots + self.hideReactionPanelTail = hideReactionPanelTail super.init(navigationBarPresentationData: nil) diff --git a/submodules/ContextUI/Sources/ContextControllerExtractedPresentationNode.swift b/submodules/ContextUI/Sources/ContextControllerExtractedPresentationNode.swift index d229d6ddba..e5f05efef2 100644 --- a/submodules/ContextUI/Sources/ContextControllerExtractedPresentationNode.swift +++ b/submodules/ContextUI/Sources/ContextControllerExtractedPresentationNode.swift @@ -645,7 +645,7 @@ final class ContextControllerExtractedPresentationNode: ASDisplayNode, ContextCo var contentTopInset: CGFloat = topInset var removedReactionContextNode: ReactionContextNode? - if let reactionItems = self.actionsStackNode.topReactionItems, !reactionItems.reactionItems.isEmpty { + if let reactionItems = self.actionsStackNode.topReactionItems, !reactionItems.reactionItems.isEmpty, let controller = self.getController() as? ContextController { let reactionContextNode: ReactionContextNode if let current = self.reactionContextNode { reactionContextNode = current @@ -681,6 +681,7 @@ final class ContextControllerExtractedPresentationNode: ASDisplayNode, ContextCo strongSelf.requestUpdateOverlayWantsToBeBelowKeyboard(transition) } ) + reactionContextNode.displayTail = !controller.hideReactionPanelTail self.reactionContextNode = reactionContextNode self.addSubnode(reactionContextNode) diff --git a/submodules/StickerPackPreviewUI/Sources/StickerPackScreen.swift b/submodules/StickerPackPreviewUI/Sources/StickerPackScreen.swift index 0be8ae331a..b66cafaad3 100644 --- a/submodules/StickerPackPreviewUI/Sources/StickerPackScreen.swift +++ b/submodules/StickerPackPreviewUI/Sources/StickerPackScreen.swift @@ -306,18 +306,7 @@ private final class StickerPackContainer: ASDisplayNode { guard let self else { return } - if let mainPreviewIconView = self.mainPreviewIcon?.view { - mainPreviewIconView.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false, completion: { [weak self] _ in - guard let self else { - return - } - if let mainPreviewIconView = self.mainPreviewIcon?.view { - self.mainPreviewIcon = nil - mainPreviewIconView.removeFromSuperview() - } - }) - mainPreviewIconView.layer.animateScale(from: 1.0, to: 0.5, duration: 0.2, removeOnCompletion: false) - } + self.hideMainPreviewIcon() } self.gridNode.interactiveScrollingEnded = { [weak self] in @@ -643,6 +632,8 @@ private final class StickerPackContainer: ASDisplayNode { return nil }, present: { [weak self] content, sourceView, sourceRect in if let strongSelf = self { + strongSelf.hideMainPreviewIcon() + let controller = PeekController(presentationData: strongSelf.presentationData, content: content, sourceView: { return (sourceView, sourceRect) }) @@ -697,6 +688,21 @@ private final class StickerPackContainer: ASDisplayNode { self.gridNode.view.addGestureRecognizer(reorderingGestureRecognizer) } + private func hideMainPreviewIcon() { + if let mainPreviewIconView = self.mainPreviewIcon?.view { + mainPreviewIconView.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false, completion: { [weak self] _ in + guard let self else { + return + } + if let mainPreviewIconView = self.mainPreviewIcon?.view { + self.mainPreviewIcon = nil + mainPreviewIconView.removeFromSuperview() + } + }) + mainPreviewIconView.layer.animateScale(from: 1.0, to: 0.5, duration: 0.2, removeOnCompletion: false) + } + } + private var reorderFeedback: HapticFeedback? private var reorderNode: ReorderingItemNode? private var reorderInitialIndex: Int? @@ -2184,7 +2190,7 @@ private final class StickerPackContainer: ASDisplayNode { transition.updateFrame(node: self.backgroundNode, frame: backgroundFrame) if let previewIconFile = self.previewIconFile, let mainPreviewIcon = self.mainPreviewIcon { - let iconFitSize = CGSize(width: 90.0, height: 90.0) + let iconFitSize = CGSize(width: 120.0, height: 120.0) let iconSize = mainPreviewIcon.update( transition: .immediate, component: AnyComponent(EmojiStatusComponent( diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageDateAndStatusNode/Sources/ChatMessageDateAndStatusNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageDateAndStatusNode/Sources/ChatMessageDateAndStatusNode.swift index f5510b8649..c1212c0a0e 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageDateAndStatusNode/Sources/ChatMessageDateAndStatusNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageDateAndStatusNode/Sources/ChatMessageDateAndStatusNode.swift @@ -356,6 +356,7 @@ public class ChatMessageDateAndStatusNode: ASDisplayNode { selectedBackground: themeColors.reactionActiveBackground.argb, deselectedForeground: themeColors.reactionInactiveForeground.argb, selectedForeground: themeColors.reactionActiveForeground.argb, + selectedIconTintColor: 0, deselectedStarsBackground: themeColors.reactionStarsInactiveBackground.argb, selectedStarsBackground: themeColors.reactionStarsActiveBackground.argb, deselectedStarsForeground: themeColors.reactionStarsInactiveForeground.argb, @@ -374,6 +375,7 @@ public class ChatMessageDateAndStatusNode: ASDisplayNode { selectedBackground: themeColors.reactionActiveBackground.argb, deselectedForeground: themeColors.reactionInactiveForeground.argb, selectedForeground: themeColors.reactionActiveForeground.argb, + selectedIconTintColor: 0, deselectedStarsBackground: themeColors.reactionStarsInactiveBackground.argb, selectedStarsBackground: themeColors.reactionStarsActiveBackground.argb, deselectedStarsForeground: themeColors.reactionStarsInactiveForeground.argb, diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageReactionsFooterContentNode/Sources/ChatMessageReactionsFooterContentNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageReactionsFooterContentNode/Sources/ChatMessageReactionsFooterContentNode.swift index 38f55f1297..a01d02ed29 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageReactionsFooterContentNode/Sources/ChatMessageReactionsFooterContentNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageReactionsFooterContentNode/Sources/ChatMessageReactionsFooterContentNode.swift @@ -78,6 +78,7 @@ public final class MessageReactionButtonsNode: ASDisplayNode { selectedBackground: themeColors.reactionActiveBackground.argb, deselectedForeground: themeColors.reactionInactiveForeground.argb, selectedForeground: themeColors.reactionActiveForeground.argb, + selectedIconTintColor: 0, deselectedStarsBackground: themeColors.reactionStarsInactiveBackground.argb, selectedStarsBackground: themeColors.reactionStarsActiveBackground.argb, deselectedStarsForeground: themeColors.reactionStarsInactiveForeground.argb, @@ -95,6 +96,7 @@ public final class MessageReactionButtonsNode: ASDisplayNode { selectedBackground: themeColors.reactionActiveBackground.argb, deselectedForeground: themeColors.reactionInactiveForeground.argb, selectedForeground: themeColors.reactionActiveForeground.argb, + selectedIconTintColor: 0, deselectedStarsBackground: themeColors.reactionStarsInactiveBackground.argb, selectedStarsBackground: themeColors.reactionStarsActiveBackground.argb, deselectedStarsForeground: themeColors.reactionStarsInactiveForeground.argb, @@ -117,6 +119,7 @@ public final class MessageReactionButtonsNode: ASDisplayNode { selectedBackground: themeColors.reactionActiveBackground.argb, deselectedForeground: themeColors.reactionInactiveForeground.argb, selectedForeground: themeColors.reactionActiveForeground.argb, + selectedIconTintColor: presentationData.theme.theme.overallDarkAppearance ? 0 : presentationData.theme.theme.chat.message.incoming.accentTextColor.argb, deselectedStarsBackground: selectReactionFillStaticColor(theme: presentationData.theme.theme, wallpaper: presentationData.theme.wallpaper, isStars: true).argb, selectedStarsBackground: themeColors.reactionStarsActiveBackground.argb, deselectedStarsForeground: themeColors.reactionStarsInactiveForeground.argb, diff --git a/submodules/TelegramUI/Sources/Chat/ChatControllerOpenMessageContextMenu.swift b/submodules/TelegramUI/Sources/Chat/ChatControllerOpenMessageContextMenu.swift index fa76f3a702..f869e5fce7 100644 --- a/submodules/TelegramUI/Sources/Chat/ChatControllerOpenMessageContextMenu.swift +++ b/submodules/TelegramUI/Sources/Chat/ChatControllerOpenMessageContextMenu.swift @@ -301,8 +301,20 @@ extension ChatControllerImpl { self.canReadHistory.set(false) + var hideReactionPanelTail = false + for media in message.media { + if let action = media as? TelegramMediaAction { + switch action.action { + case .phoneCall: + break + default: + hideReactionPanelTail = true + } + } + } + let isSecret = self.presentationInterfaceState.copyProtectionEnabled || self.chatLocation.peerId?.namespace == Namespaces.Peer.SecretChat - let controller = ContextController(presentationData: self.presentationData, source: source, items: actionsSignal, recognizer: recognizer, gesture: gesture, disableScreenshots: isSecret) + let controller = ContextController(presentationData: self.presentationData, source: source, items: actionsSignal, recognizer: recognizer, gesture: gesture, disableScreenshots: isSecret, hideReactionPanelTail: hideReactionPanelTail) controller.dismissed = { [weak self] in self?.canReadHistory.set(true) } diff --git a/versions.json b/versions.json index 77784a5a49..ab99182b79 100644 --- a/versions.json +++ b/versions.json @@ -1,5 +1,5 @@ { - "app": "11.6", + "app": "11.6.1", "xcode": "16.0", "bazel": "7.3.1:981f82a470bad1349322b6f51c9c6ffa0aa291dab1014fac411543c12e661dff", "macos": "15.0"