mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Privacy settings
This commit is contained in:
@@ -114,6 +114,7 @@ enum ChatListNodeEntry: Comparable, Identifiable {
|
||||
var topForumTopicItems: [EngineChatList.ForumTopicData]
|
||||
var revealed: Bool
|
||||
var storyState: ChatListNodeState.StoryState?
|
||||
var requiresPremiumForMessaging: Bool
|
||||
|
||||
init(
|
||||
index: EngineChatList.Item.Index,
|
||||
@@ -138,7 +139,8 @@ enum ChatListNodeEntry: Comparable, Identifiable {
|
||||
forumTopicData: EngineChatList.ForumTopicData?,
|
||||
topForumTopicItems: [EngineChatList.ForumTopicData],
|
||||
revealed: Bool,
|
||||
storyState: ChatListNodeState.StoryState?
|
||||
storyState: ChatListNodeState.StoryState?,
|
||||
requiresPremiumForMessaging: Bool
|
||||
) {
|
||||
self.index = index
|
||||
self.presentationData = presentationData
|
||||
@@ -163,6 +165,7 @@ enum ChatListNodeEntry: Comparable, Identifiable {
|
||||
self.topForumTopicItems = topForumTopicItems
|
||||
self.revealed = revealed
|
||||
self.storyState = storyState
|
||||
self.requiresPremiumForMessaging = requiresPremiumForMessaging
|
||||
}
|
||||
|
||||
static func ==(lhs: PeerEntryData, rhs: PeerEntryData) -> Bool {
|
||||
@@ -275,6 +278,9 @@ enum ChatListNodeEntry: Comparable, Identifiable {
|
||||
if lhs.storyState != rhs.storyState {
|
||||
return false
|
||||
}
|
||||
if lhs.requiresPremiumForMessaging != rhs.requiresPremiumForMessaging {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -701,7 +707,8 @@ func chatListNodeEntriesForView(view: EngineChatList, state: ChatListNodeState,
|
||||
stats: stats,
|
||||
hasUnseenCloseFriends: stats.hasUnseenCloseFriends
|
||||
)
|
||||
}
|
||||
},
|
||||
requiresPremiumForMessaging: false
|
||||
))
|
||||
|
||||
if let threadInfo, threadInfo.isHidden {
|
||||
@@ -751,7 +758,8 @@ func chatListNodeEntriesForView(view: EngineChatList, state: ChatListNodeState,
|
||||
forumTopicData: nil,
|
||||
topForumTopicItems: [],
|
||||
revealed: false,
|
||||
storyState: nil
|
||||
storyState: nil,
|
||||
requiresPremiumForMessaging: false
|
||||
)))
|
||||
if foundPinningIndex != 0 {
|
||||
foundPinningIndex -= 1
|
||||
@@ -782,7 +790,8 @@ func chatListNodeEntriesForView(view: EngineChatList, state: ChatListNodeState,
|
||||
forumTopicData: nil,
|
||||
topForumTopicItems: [],
|
||||
revealed: false,
|
||||
storyState: nil
|
||||
storyState: nil,
|
||||
requiresPremiumForMessaging: false
|
||||
)))
|
||||
} else {
|
||||
if !filteredAdditionalItemEntries.isEmpty {
|
||||
@@ -833,7 +842,8 @@ func chatListNodeEntriesForView(view: EngineChatList, state: ChatListNodeState,
|
||||
forumTopicData: item.item.forumTopicData,
|
||||
topForumTopicItems: item.item.topForumTopicItems,
|
||||
revealed: state.hiddenItemShouldBeTemporaryRevealed || state.editing,
|
||||
storyState: nil
|
||||
storyState: nil,
|
||||
requiresPremiumForMessaging: false
|
||||
)))
|
||||
if pinningIndex != 0 {
|
||||
pinningIndex -= 1
|
||||
|
||||
Reference in New Issue
Block a user