Fix problems with read only room flag

A reload would cause the prop to not be set.
This commit is contained in:
N-Pex 2023-05-11 11:07:13 +02:00
parent 817ca0c801
commit d66d4c781d
4 changed files with 13 additions and 4 deletions

View file

@ -94,9 +94,18 @@ export default {
immediate: true,
handler(roomId) {
this.currentRoom = this.getRoom(roomId);
this.currentRoomIsReadOnlyForUser = this.isReadOnlyRoomForUser(roomId, this.currentUserId);
},
},
currentRoom: {
immediate: true,
handler(room) {
if (room) {
this.currentRoomIsReadOnlyForUser = this.isReadOnlyRoomForUser(room.roomId, this.currentUserId);
} else {
this.currentRoomIsReadOnlyForUser = false;
}
}
}
},
methods: {