Room info, show back arrow even after reload
This commit is contained in:
parent
e794a95c68
commit
0f06857b91
2 changed files with 24 additions and 7 deletions
|
|
@ -5,8 +5,8 @@
|
|||
<v-btn
|
||||
id="btn-back"
|
||||
text
|
||||
:class="$navigation && $navigation.canPop() ? 'v-visible' : 'v-hidden'"
|
||||
@click.stop="$navigation.pop"
|
||||
:class="(($navigation && $navigation.canPop()) || $matrix.currentRoomId) ? 'v-visible' : 'v-hidden'"
|
||||
@click.stop="goBack()"
|
||||
>
|
||||
<v-icon>arrow_back</v-icon>
|
||||
<span class="d-none d-sm-block">{{ $t("menu.back") }}</span>
|
||||
|
|
@ -414,7 +414,10 @@ export default {
|
|||
handler(ignoredNewVal, ignoredOldVal) {
|
||||
console.log("RoomInfo: Current room changed");
|
||||
this.updateMembers();
|
||||
this.updateQRCode();
|
||||
this.$nextTick(() => {
|
||||
// Wait a tick, we want to be sure that the QR canvas ref is already created!
|
||||
this.updateQRCode();
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -686,6 +689,23 @@ export default {
|
|||
if (this.room) {
|
||||
this.$matrix.banUser(this.room.roomId, member.userId)
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Go back to previous page, or if none on the stack, go back to current room view.
|
||||
*/
|
||||
goBack() {
|
||||
if (this.$navigation.canPop()) {
|
||||
this.$navigation.pop();
|
||||
} else if (this.$matrix.currentRoomId) {
|
||||
this.$navigation.push(
|
||||
{
|
||||
name: "Chat",
|
||||
params: { roomId: util.sanitizeRoomId(this.$matrix.currentRoomId) },
|
||||
},
|
||||
-1
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue