do not switch away from home space on notification
If the preference "Show all Rooms in Home" is selected element should not switch away from the home space when clicking a notification for a room in some other space. With this change one stays in the home space when the said preference is active. fixes #5180 Signed-off-by: Michael Loipführer <milo@sft.lol>
This commit is contained in:
parent
2839d1467f
commit
6b9b688072
|
@ -0,0 +1 @@
|
|||
Do not switch away from home space on notification when "Show all Rooms in Home" is selected.
|
|
@ -207,7 +207,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