mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Star reactions
This commit is contained in:
@@ -1480,7 +1480,7 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI
|
||||
}
|
||||
|
||||
var effectiveAuthor: Peer?
|
||||
let overrideEffectiveAuthor = false
|
||||
var overrideEffectiveAuthor = false
|
||||
var ignoreForward = false
|
||||
var displayAuthorInfo: Bool
|
||||
var ignoreNameHiding = false
|
||||
@@ -1551,13 +1551,10 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI
|
||||
}
|
||||
|
||||
//TODO:release
|
||||
/*if let channel = firstMessage.peers[firstMessage.id.peerId] as? TelegramChannel, case let .broadcast(info) = channel.info, info.flags.contains(.messagesShouldHaveProfiles) {
|
||||
hasAvatar = true
|
||||
if let authorSignatureAttribute = firstMessage.authorSignatureAttribute {
|
||||
effectiveAuthor = TelegramUser(id: PeerId(namespace: Namespaces.Peer.Empty, id: PeerId.Id._internalFromInt64Value(Int64(authorSignatureAttribute.signature.persistentHashValue % 32))), accessHash: nil, firstName: authorSignatureAttribute.signature, lastName: nil, username: nil, phone: nil, photo: [], botInfo: nil, restrictionInfo: nil, flags: [], emojiStatus: nil, usernames: [], storiesHidden: nil, nameColor: nil, backgroundEmojiId: nil, profileColor: nil, profileBackgroundEmojiId: nil, subscriberCount: nil)
|
||||
overrideEffectiveAuthor = true
|
||||
|
||||
if let channel = firstMessage.peers[firstMessage.id.peerId] as? TelegramChannel, case let .broadcast(info) = channel.info, firstMessage.author?.id != channel.id {
|
||||
if info.flags.contains(.messagesShouldHaveProfiles) {
|
||||
var allowAuthor = incoming
|
||||
overrideEffectiveAuthor = true
|
||||
|
||||
if let author = firstMessage.author, author is TelegramChannel, !incoming || item.presentationData.isPreview {
|
||||
allowAuthor = true
|
||||
@@ -1573,7 +1570,7 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI
|
||||
displayAuthorInfo = false
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
if !peerId.isRepliesOrSavedMessages(accountPeerId: item.context.account.peerId) {
|
||||
if peerId.isGroupOrChannel && effectiveAuthor != nil {
|
||||
@@ -1591,6 +1588,8 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI
|
||||
hasAvatar = incoming
|
||||
} else if case .customChatContents = item.chatLocation {
|
||||
hasAvatar = false
|
||||
} else if overrideEffectiveAuthor {
|
||||
hasAvatar = true
|
||||
}
|
||||
}
|
||||
} else if incoming {
|
||||
|
||||
Reference in New Issue
Block a user