Separated encrypted from non-encrypted rooms. Moved DMs to the bottom.

This commit is contained in:
Stefan Ceriu
2022-03-10 16:40:16 +02:00
parent d0f88356d2
commit fc8e92eef1
2 changed files with 20 additions and 16 deletions
@@ -33,15 +33,15 @@ struct HomeScreen: View {
}
} else {
List {
Section("People") {
ForEach(context.viewState.firstDirectRooms) { room in
Section("Rooms") {
ForEach(context.viewState.unencryptedRooms) { room in
RoomCell(room: room, context: context)
}
let other = context.viewState.otherDirectRooms
let other = context.viewState.encryptedRooms
if other.count > 0 {
DisclosureGroup("See more") {
DisclosureGroup("Encrypted") {
ForEach(other) { room in
RoomCell(room: room, context: context)
}
@@ -49,15 +49,15 @@ struct HomeScreen: View {
}
}
Section("Rooms") {
ForEach(context.viewState.firstNondirectRooms) { room in
Section("People") {
ForEach(context.viewState.unencryptedDMs) { room in
RoomCell(room: room, context: context)
}
let other = context.viewState.otherNondirectRooms
let other = context.viewState.encryptedDMs
if other.count > 0 {
DisclosureGroup("See more") {
DisclosureGroup("Encrypted") {
ForEach(other) { room in
RoomCell(room: room, context: context)
}