Move invites to dedicated sections and enable section collapse (#5683)

* Display invites in dedicated sections

* Activate shrinkable and fix home number of rows for section

* Rework section header

* Display badge in people and room tabs

* Add changelog & remove useless todo

* Improve isSectionShrinked condition, remove useless import and shrinkable sets

* Restore invitation count in tab bar badge

* Display badge for invites section

* Add comment on invites count

* Update right accessory view on data source update

Co-authored-by: Arnaud Ringenbach <arnaud.ringenbach@niji.fr>
This commit is contained in:
aringenbach
2022-02-28 13:48:07 +01:00
committed by GitHub
parent 20fb5d2aee
commit 60f2355e54
12 changed files with 206 additions and 70 deletions
@@ -51,10 +51,10 @@ public class DiscussionsCount: NSObject {
super.init()
}
public init(withRoomListDataCounts counts: MXRoomListDataCounts) {
self.numberOfNotified = counts.numberOfNotifiedRooms
self.numberOfHighlighted = counts.numberOfHighlightedRooms + counts.numberOfInvitedRooms
self.numberOfUnsent = counts.numberOfUnsentRooms
public init(withRoomListDataCounts counts: [MXRoomListDataCounts]) {
self.numberOfNotified = counts.reduce(0, { $0 + $1.numberOfNotifiedRooms })
self.numberOfHighlighted = counts.reduce(0, { $0 + $1.numberOfHighlightedRooms + $1.numberOfInvitedRooms })
self.numberOfUnsent = counts.reduce(0, { $0 + $1.numberOfUnsentRooms })
super.init()
}
}