mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various improvements
This commit is contained in:
@@ -91,6 +91,7 @@ public enum ChatListNotice: Equatable {
|
||||
case reviewLogin(newSessionReview: NewSessionReview, totalCount: Int)
|
||||
case premiumGrace
|
||||
case starsSubscriptionLowBalance(amount: StarsAmount, peers: [EnginePeer])
|
||||
case setupPhoto(EnginePeer)
|
||||
}
|
||||
|
||||
enum ChatListNodeEntry: Comparable, Identifiable {
|
||||
@@ -605,6 +606,7 @@ func chatListNodeEntriesForView(view: EngineChatList, state: ChatListNodeState,
|
||||
|
||||
var result: [ChatListNodeEntry] = []
|
||||
|
||||
var hasContacts = false
|
||||
if !view.hasEarlier {
|
||||
var existingPeerIds = Set<EnginePeer.Id>()
|
||||
for item in view.items {
|
||||
@@ -620,8 +622,9 @@ func chatListNodeEntriesForView(view: EngineChatList, state: ChatListNodeState,
|
||||
peer: contact.peer,
|
||||
presence: contact.presence
|
||||
)))
|
||||
hasContacts = true
|
||||
}
|
||||
if !contacts.isEmpty {
|
||||
if hasContacts {
|
||||
result.append(.SectionHeader(presentationData: state.presentationData, displayHide: !view.items.isEmpty))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user