mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
[WIP] Saved messages
This commit is contained in:
@@ -113,6 +113,7 @@ extension ChatControllerImpl {
|
||||
if message.areReactionsTags(accountPeerId: self.context.account.peerId) {
|
||||
//TODO:localize
|
||||
actions.reactionsTitle = "Tag the message with an emoji for quick access later"
|
||||
actions.allPresetReactionsAreAvailable = true
|
||||
}
|
||||
actions.selectedReactionItems = selectedReactions.reactions
|
||||
|
||||
@@ -344,29 +345,23 @@ extension ChatControllerImpl {
|
||||
isFirst = !currentReactions.contains(where: { $0.value == chosenReaction })
|
||||
}
|
||||
|
||||
/*guard let allowedReactions = allowedReactions else {
|
||||
itemNode.openMessageContextMenu()
|
||||
return
|
||||
}
|
||||
|
||||
switch allowedReactions {
|
||||
case let .set(set):
|
||||
if !messageAlreadyHasThisReaction && updatedReactions.contains(where: { !set.contains($0) }) {
|
||||
itemNode.openMessageContextMenu()
|
||||
return
|
||||
}
|
||||
case .all:
|
||||
break
|
||||
}*/
|
||||
|
||||
if removedReaction == nil, case .custom = chosenReaction {
|
||||
if let peer = self.presentationInterfaceState.renderedPeer?.peer as? TelegramChannel, case .broadcast = peer.info {
|
||||
} else {
|
||||
if message.areReactionsTags(accountPeerId: self.context.account.peerId) {
|
||||
if removedReaction == nil, !topReactions.contains(where: { $0.reaction.rawValue == chosenReaction }) {
|
||||
if !self.presentationInterfaceState.isPremium {
|
||||
controller?.premiumReactionsSelected?()
|
||||
return
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if removedReaction == nil, case .custom = chosenReaction {
|
||||
if let peer = self.presentationInterfaceState.renderedPeer?.peer as? TelegramChannel, case .broadcast = peer.info {
|
||||
} else {
|
||||
if !self.presentationInterfaceState.isPremium {
|
||||
controller?.premiumReactionsSelected?()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.chatDisplayNode.historyNode.forEachItemNode { itemNode in
|
||||
|
||||
Reference in New Issue
Block a user