-
Notifications
You must be signed in to change notification settings - Fork 758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Home
always showing all rooms
#6666
Changes from 3 commits
1ba8d29
e847688
2d8ef99
09d8405
8ef0850
e4640f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixes the room list not taking into account the Show all rooms in Home preference |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,7 +144,7 @@ class UnreadMessagesSharedViewModel @AssistedInject constructor( | |
this.memberships = listOf(Membership.JOIN) | ||
this.spaceFilter = SpaceFilter.OrphanRooms.takeIf { | ||
!vectorPreferences.prefSpacesShowAllRoomInHome() | ||
} | ||
} ?: SpaceFilter.NoFilter | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this case I think a if/else would be clearer: if (vectorPreferences.prefSpacesShowAllRoomInHome()) {
SpaceFilter.NoFilter
} else {
SpaceFilter.OrphanRooms
} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agreed, will update 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,7 @@ class SpaceListViewModel @AssistedInject constructor( | |
this.memberships = listOf(Membership.JOIN) | ||
this.spaceFilter = SpaceFilter.OrphanRooms.takeIf { | ||
!vectorPreferences.prefSpacesShowAllRoomInHome() | ||
} | ||
} ?: SpaceFilter.NoFilter | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same remark |
||
}, sortOrder = RoomSortOrder.NONE | ||
).asFlow() | ||
.sample(300) | ||
|
@@ -117,7 +117,7 @@ class SpaceListViewModel @AssistedInject constructor( | |
this.memberships = listOf(Membership.JOIN) | ||
this.spaceFilter = SpaceFilter.OrphanRooms.takeIf { | ||
!vectorPreferences.prefSpacesShowAllRoomInHome() | ||
} | ||
} ?: SpaceFilter.NoFilter | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same remark |
||
} | ||
) | ||
val counts = RoomAggregateNotificationCount( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe mention this API change in a file
6666.sdk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e4640f1