More navigation work
A normal room link https://server.com/#/room/#PUBLIC:matrix.org will now redirect to the /join/ screen if you are not logged in or not joined.
This commit is contained in:
parent
0130858908
commit
7165b5af8c
3 changed files with 8 additions and 8 deletions
|
|
@ -338,7 +338,7 @@ export default {
|
|||
room: {
|
||||
immediate: true,
|
||||
handler(room, oldRoom) {
|
||||
if (room == oldRoom) {
|
||||
if (room && room == oldRoom) {
|
||||
return; // No change.
|
||||
}
|
||||
console.log("Chat: Current room changed");
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
if (this.loggedIn) {
|
||||
this.$navigation.push({name: "Chat", params: { roomId: null }}, -1);
|
||||
this.$navigation.push({name: "Chat", params: { roomId: this.$matrix.currentRoomId }}, -1);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -114,7 +114,7 @@ export default {
|
|||
this.loading = true;
|
||||
this.$store.dispatch("auth/login", this.user).then(
|
||||
() => {
|
||||
this.$navigation.push({name: "Chat", params: { roomId: null }}, -1);
|
||||
this.$navigation.push({name: "Chat", params: { roomId: this.$matrix.currentRoomId }}, -1);
|
||||
},
|
||||
(error) => {
|
||||
this.loading = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue