Various improvements

This commit is contained in:
Ilya Laktyushin
2024-12-06 09:31:49 +04:00
parent c7ab78a8a1
commit fdb4b80e27
56 changed files with 520 additions and 153 deletions

View File

@@ -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))
}
}