mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
Merge pull request #5827 from mikonse/fix-notification-space-switch
do not switch away from home space on notification
This commit is contained in:
commit
5b985dc032
1
changelog.d/5827.bugfix
Normal file
1
changelog.d/5827.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Do not switch away from home space on notification when "Show all Rooms in Home" is selected.
|
@ -211,7 +211,8 @@ class TimelineViewModel @AssistedInject constructor(
|
||||
appStateHandler.getCurrentRoomGroupingMethod()?.space().let { currentSpace ->
|
||||
val currentRoomSummary = room.roomSummary() ?: return@let
|
||||
// nothing we are good
|
||||
if (currentSpace == null || !currentRoomSummary.flattenParentIds.contains(currentSpace.roomId)) {
|
||||
if ((currentSpace == null && !vectorPreferences.prefSpacesShowAllRoomInHome())
|
||||
|| (currentSpace != null && !currentRoomSummary.flattenParentIds.contains(currentSpace.roomId))) {
|
||||
// take first one or switch to home
|
||||
appStateHandler.setCurrentSpace(
|
||||
currentRoomSummary
|
||||
|
Loading…
Reference in New Issue
Block a user