mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Merge commit 'b909d1bea021e1c9c86626981a189d715dfffad5'
This commit is contained in:
@@ -87,6 +87,7 @@ public enum ChatListItemContent {
|
||||
public var hasUnseenMentions: Bool
|
||||
public var hasUnseenReactions: Bool
|
||||
public var draftState: DraftState?
|
||||
public var mediaDraftContentType: EngineChatList.MediaDraftContentType?
|
||||
public var inputActivities: [(EnginePeer, PeerInputActivity)]?
|
||||
public var promoInfo: ChatListNodeEntryPromoInfo?
|
||||
public var ignoreUnreadBadge: Bool
|
||||
@@ -109,6 +110,7 @@ public enum ChatListItemContent {
|
||||
hasUnseenMentions: Bool,
|
||||
hasUnseenReactions: Bool,
|
||||
draftState: DraftState?,
|
||||
mediaDraftContentType: EngineChatList.MediaDraftContentType?,
|
||||
inputActivities: [(EnginePeer, PeerInputActivity)]?,
|
||||
promoInfo: ChatListNodeEntryPromoInfo?,
|
||||
ignoreUnreadBadge: Bool,
|
||||
@@ -130,6 +132,7 @@ public enum ChatListItemContent {
|
||||
self.hasUnseenMentions = hasUnseenMentions
|
||||
self.hasUnseenReactions = hasUnseenReactions
|
||||
self.draftState = draftState
|
||||
self.mediaDraftContentType = mediaDraftContentType
|
||||
self.inputActivities = inputActivities
|
||||
self.promoInfo = promoInfo
|
||||
self.ignoreUnreadBadge = ignoreUnreadBadge
|
||||
@@ -1648,6 +1651,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
||||
let isRemovedFromTotalUnreadCount: Bool
|
||||
let peerPresence: EnginePeer.Presence?
|
||||
let draftState: ChatListItemContent.DraftState?
|
||||
let mediaDraftContentType: EngineChatList.MediaDraftContentType?
|
||||
let hasUnseenMentions: Bool
|
||||
let hasUnseenReactions: Bool
|
||||
let inputActivities: [(EnginePeer, PeerInputActivity)]?
|
||||
@@ -1699,6 +1703,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
||||
return EnginePeer.Presence(status: presence.status, lastActivity: 0)
|
||||
}
|
||||
draftState = draftStateValue
|
||||
mediaDraftContentType = peerData.mediaDraftContentType
|
||||
threadInfo = threadInfoValue
|
||||
hasUnseenMentions = hasUnseenMentionsValue
|
||||
hasUnseenReactions = hasUnseenReactionsValue
|
||||
@@ -1743,6 +1748,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
||||
combinedReadState = nil
|
||||
isRemovedFromTotalUnreadCount = false
|
||||
draftState = nil
|
||||
mediaDraftContentType = nil
|
||||
hasUnseenMentions = false
|
||||
hasUnseenReactions = false
|
||||
inputActivities = nil
|
||||
@@ -2004,7 +2010,18 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
||||
chatListText = (text, messageText)
|
||||
}
|
||||
|
||||
if inlineAuthorPrefix == nil, let draftState = draftState {
|
||||
if inlineAuthorPrefix == nil, let mediaDraftContentType {
|
||||
hasDraft = true
|
||||
authorAttributedString = NSAttributedString(string: item.presentationData.strings.DialogList_Draft, font: textFont, textColor: theme.messageDraftTextColor)
|
||||
|
||||
//TODO:localize
|
||||
switch mediaDraftContentType {
|
||||
case .audio:
|
||||
attributedText = NSAttributedString(string: "Voice Message", font: textFont, textColor: theme.messageTextColor)
|
||||
case .video:
|
||||
attributedText = NSAttributedString(string: "Video Message", font: textFont, textColor: theme.messageTextColor)
|
||||
}
|
||||
} else if inlineAuthorPrefix == nil, let draftState = draftState {
|
||||
hasDraft = true
|
||||
authorAttributedString = NSAttributedString(string: item.presentationData.strings.DialogList_Draft, font: textFont, textColor: theme.messageDraftTextColor)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user