Don't remove room from store on leave
This commit is contained in:
parent
379d733d33
commit
381ab6d84e
5 changed files with 120 additions and 641 deletions
|
|
@ -458,7 +458,7 @@ export default {
|
|||
return this.fullyReadMarker || this.room.getEventReadUpTo(this.$matrix.currentUserId, false);
|
||||
},
|
||||
fullyReadMarker() {
|
||||
const readEvent = this.room.getAccountData("m.fully_read");
|
||||
const readEvent = this.room && this.room.getAccountData("m.fully_read");
|
||||
if (readEvent) {
|
||||
return readEvent.getContent().event_id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -269,7 +269,10 @@ export default {
|
|||
if (roomName && roomName.startsWith("@")) {
|
||||
return roomName.substring(roomName.indexOf("@") + 1, lastIndex);
|
||||
}
|
||||
return roomName ? roomName.substring(roomName.indexOf("#") + 1, lastIndex) : "";
|
||||
if (roomName && roomName.startsWith("#")) {
|
||||
return roomName.substring(roomName.indexOf("#") + 1, lastIndex);
|
||||
}
|
||||
return roomName ? roomName : "";
|
||||
},
|
||||
getRoomInfo() {
|
||||
if (this.roomId.startsWith("#")) {
|
||||
|
|
@ -306,6 +309,8 @@ export default {
|
|||
const room = this.$matrix.getRoom(this.roomId);
|
||||
if (room) {
|
||||
this.roomName = this.removeHomeServer(room.name || this.roomName);
|
||||
} else {
|
||||
this.roomName = this.removeHomeServer(this.roomAliasOrId);
|
||||
}
|
||||
this.waitingForInfo = false;
|
||||
}
|
||||
|
|
@ -385,14 +390,14 @@ export default {
|
|||
return this.$matrix.matrixClient.joinRoom(this.roomId);
|
||||
}
|
||||
})
|
||||
.then((ignoredRoom) => {
|
||||
.then((room) => {
|
||||
this.loading = false;
|
||||
this.loadingMessage = null;
|
||||
this.$nextTick(() => {
|
||||
this.$navigation.push(
|
||||
{
|
||||
name: "Chat",
|
||||
params: { roomId: util.sanitizeRoomId(this.roomAliasOrId) },
|
||||
params: { roomId: util.sanitizeRoomId(room.roomId) },
|
||||
},
|
||||
-1
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue