diff --git a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNode.swift b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNode.swift index 921f90db6c..983445d9ce 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNode.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNode.swift @@ -489,7 +489,9 @@ final class PeerInfoHeaderNode: ASDisplayNode { let credibilityIcon: CredibilityIcon var verifiedIcon: CredibilityIcon = .none if let peer = peer { - if peer.isFake { + if peer.id == self.context.account.peerId && !self.isSettings { + credibilityIcon = .none + } else if peer.isFake { credibilityIcon = .fake } else if peer.isScam { credibilityIcon = .scam @@ -969,7 +971,11 @@ final class PeerInfoHeaderNode: ASDisplayNode { if let peer = peer { var title: String if peer.id == self.context.account.peerId && !self.isSettings { - title = presentationData.strings.Conversation_SavedMessages + if case .replyThread = self.chatLocation { + title = presentationData.strings.Conversation_MyNotes + } else { + title = presentationData.strings.Conversation_SavedMessages + } } else if peer.id.isAnonymousSavedMessages { title = presentationData.strings.ChatList_AuthorHidden } else if let threadData = threadData { diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index 6a8daafa51..7db728f2c5 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -1266,6 +1266,10 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G } if !force && message.areReactionsTags(accountPeerId: strongSelf.context.account.peerId) { + if case .pinnedMessages = strongSelf.subject { + return + } + if !strongSelf.presentationInterfaceState.isPremium { //TODO:localize let context = strongSelf.context @@ -2807,7 +2811,9 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G return .none } if case let .replyThread(replyThreadMessage) = strongSelf.chatLocation, replyThreadMessage.peerId == strongSelf.context.account.peerId { - return .none + if replyThreadMessage.threadId != strongSelf.context.account.peerId.toInt64() { + return .none + } } if case .peer = strongSelf.chatLocation, let channel = strongSelf.presentationInterfaceState.renderedPeer?.peer as? TelegramChannel, channel.flags.contains(.isForum) { if message.threadId == nil { diff --git a/submodules/TelegramUI/Sources/ChatControllerOpenMessageReactionContextMenu.swift b/submodules/TelegramUI/Sources/ChatControllerOpenMessageReactionContextMenu.swift index ada7b1dac6..32c7992abc 100644 --- a/submodules/TelegramUI/Sources/ChatControllerOpenMessageReactionContextMenu.swift +++ b/submodules/TelegramUI/Sources/ChatControllerOpenMessageReactionContextMenu.swift @@ -118,21 +118,24 @@ extension ChatControllerImpl { }) }))) - if self.presentationInterfaceState.historyFilter?.customTags != tags { - items.append(.action(ContextMenuActionItem(text: self.presentationData.strings.Chat_ReactionContextMenu_FilterByTag, icon: { theme in - return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/TagFilter"), color: theme.contextMenu.primaryColor) - }, action: { [weak self] _, a in - guard let self else { + if case .pinnedMessages = self.subject { + } else { + if self.presentationInterfaceState.historyFilter?.customTags != tags { + items.append(.action(ContextMenuActionItem(text: self.presentationData.strings.Chat_ReactionContextMenu_FilterByTag, icon: { theme in + return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/TagFilter"), color: theme.contextMenu.primaryColor) + }, action: { [weak self] _, a in + guard let self else { + a(.default) + return + } + self.chatDisplayNode.historyNode.frozenMessageForScrollingReset = message.id + self.interfaceInteraction?.updateHistoryFilter { _ in + return ChatPresentationInterfaceState.HistoryFilter(customTags: tags, isActive: true) + } + a(.default) - return - } - self.chatDisplayNode.historyNode.frozenMessageForScrollingReset = message.id - self.interfaceInteraction?.updateHistoryFilter { _ in - return ChatPresentationInterfaceState.HistoryFilter(customTags: tags, isActive: true) - } - - a(.default) - }))) + }))) + } } items.append(.action(ContextMenuActionItem(text: self.presentationData.strings.Chat_ReactionContextMenu_RemoveTag, textColor: .destructive, icon: { theme in diff --git a/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift b/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift index 5ae420f858..18b4e5ef99 100644 --- a/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift +++ b/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift @@ -287,7 +287,9 @@ func canReplyInChat(_ chatPresentationInterfaceState: ChatPresentationInterfaceS break } if case let .replyThread(replyThreadMessage) = chatPresentationInterfaceState.chatLocation, replyThreadMessage.peerId == accountPeerId { - return false + if replyThreadMessage.threadId != accountPeerId.toInt64() { + return false + } } if let channel = peer as? TelegramChannel, channel.flags.contains(.isForum) {