mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Saved messages view as chats
This commit is contained in:
@@ -115,6 +115,7 @@ enum ChatListNodeEntry: Comparable, Identifiable {
|
||||
var revealed: Bool
|
||||
var storyState: ChatListNodeState.StoryState?
|
||||
var requiresPremiumForMessaging: Bool
|
||||
var displayAsTopicList: Bool
|
||||
|
||||
init(
|
||||
index: EngineChatList.Item.Index,
|
||||
@@ -140,7 +141,8 @@ enum ChatListNodeEntry: Comparable, Identifiable {
|
||||
topForumTopicItems: [EngineChatList.ForumTopicData],
|
||||
revealed: Bool,
|
||||
storyState: ChatListNodeState.StoryState?,
|
||||
requiresPremiumForMessaging: Bool
|
||||
requiresPremiumForMessaging: Bool,
|
||||
displayAsTopicList: Bool
|
||||
) {
|
||||
self.index = index
|
||||
self.presentationData = presentationData
|
||||
@@ -166,6 +168,7 @@ enum ChatListNodeEntry: Comparable, Identifiable {
|
||||
self.revealed = revealed
|
||||
self.storyState = storyState
|
||||
self.requiresPremiumForMessaging = requiresPremiumForMessaging
|
||||
self.displayAsTopicList = displayAsTopicList
|
||||
}
|
||||
|
||||
static func ==(lhs: PeerEntryData, rhs: PeerEntryData) -> Bool {
|
||||
@@ -281,6 +284,9 @@ enum ChatListNodeEntry: Comparable, Identifiable {
|
||||
if lhs.requiresPremiumForMessaging != rhs.requiresPremiumForMessaging {
|
||||
return false
|
||||
}
|
||||
if lhs.displayAsTopicList != rhs.displayAsTopicList {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -708,7 +714,8 @@ func chatListNodeEntriesForView(view: EngineChatList, state: ChatListNodeState,
|
||||
hasUnseenCloseFriends: stats.hasUnseenCloseFriends
|
||||
)
|
||||
},
|
||||
requiresPremiumForMessaging: false
|
||||
requiresPremiumForMessaging: false,
|
||||
displayAsTopicList: entry.displayAsTopicList
|
||||
))
|
||||
|
||||
if let threadInfo, threadInfo.isHidden {
|
||||
@@ -759,7 +766,8 @@ func chatListNodeEntriesForView(view: EngineChatList, state: ChatListNodeState,
|
||||
topForumTopicItems: [],
|
||||
revealed: false,
|
||||
storyState: nil,
|
||||
requiresPremiumForMessaging: false
|
||||
requiresPremiumForMessaging: false,
|
||||
displayAsTopicList: false
|
||||
)))
|
||||
if foundPinningIndex != 0 {
|
||||
foundPinningIndex -= 1
|
||||
@@ -791,7 +799,8 @@ func chatListNodeEntriesForView(view: EngineChatList, state: ChatListNodeState,
|
||||
topForumTopicItems: [],
|
||||
revealed: false,
|
||||
storyState: nil,
|
||||
requiresPremiumForMessaging: false
|
||||
requiresPremiumForMessaging: false,
|
||||
displayAsTopicList: false
|
||||
)))
|
||||
} else {
|
||||
if !filteredAdditionalItemEntries.isEmpty {
|
||||
@@ -843,7 +852,8 @@ func chatListNodeEntriesForView(view: EngineChatList, state: ChatListNodeState,
|
||||
topForumTopicItems: item.item.topForumTopicItems,
|
||||
revealed: state.hiddenItemShouldBeTemporaryRevealed || state.editing,
|
||||
storyState: nil,
|
||||
requiresPremiumForMessaging: false
|
||||
requiresPremiumForMessaging: false,
|
||||
displayAsTopicList: false
|
||||
)))
|
||||
if pinningIndex != 0 {
|
||||
pinningIndex -= 1
|
||||
|
||||
Reference in New Issue
Block a user