`Ctrl+k` doesn't update sidebar
Describe the bug
If you're inside space A in the sidebar, and use ctrl+k to go to a room on space B, then the sidebar still stays on space A.
Expected behavior
The sidebar should be in sync with the current room.
I am interested in working on this issue. Is there any extra information I need to know before getting started?
@Mapledv If we can create a mapping of selected space to selected room id(if that selected space has this room as child). We can call this map selectedSpaceToRoomId.
When user select a space we can automatically select the selected room (by looking into mapping) or if there is not any we can select by activity. (This will fix #353)
Now that we have this mapping and whenever we open a room (lets say RoomA) (from ctrl+k or etc):
- we can get parents of RoomA using
roomlist.roomIdToParentsmap; - we will filter these parent spaces if
selectedSpaceToRoomIdpoint to RoomA. - now if we have filtered array.length > 0 we can open the first.
- else we can open first from unfiltered parents.
- or if there is no parents we can open home or directs message tab
To make it more perfect we can add a timestamp in selectedSpaceToRoomId so we select the space which has latest timestamp (^ in point 3).
Let me know if you have any better ideas