You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Goto /home when forgetting the last room
This commit is contained in:
@ -570,6 +570,12 @@ module.exports = React.createClass({
|
|||||||
const allRooms = RoomListSorter.mostRecentActivityFirst(
|
const allRooms = RoomListSorter.mostRecentActivityFirst(
|
||||||
MatrixClientPeg.get().getRooms(),
|
MatrixClientPeg.get().getRooms(),
|
||||||
);
|
);
|
||||||
|
if (allRooms.length === 0) {
|
||||||
|
dis.dispatch({
|
||||||
|
action: 'view_home_page',
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
let roomIndex = -1;
|
let roomIndex = -1;
|
||||||
for (let i = 0; i < allRooms.length; ++i) {
|
for (let i = 0; i < allRooms.length; ++i) {
|
||||||
if (allRooms[i].roomId == this.state.currentRoomId) {
|
if (allRooms[i].roomId == this.state.currentRoomId) {
|
||||||
|
Reference in New Issue
Block a user