Skip to content

Commit

Permalink
Merge pull request #380 from weni-ai/fix/back-previous-room
Browse files Browse the repository at this point in the history
Fixed redirection to previous room when changing rooms in a short period of time
  • Loading branch information
Aldemylla authored Nov 29, 2023
2 parents 4f607c7 + 3948d70 commit 886a81a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/views/chats/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ export default {
return;
}
if (newValue.uuid !== this.roomId && !this.discussionId) {
this.$router.replace({ name: 'room', params: { roomId: newValue.uuid } });
}
if (newValue.uuid !== oldValue?.uuid) {
this.isRoomSkeletonActive = true;
this.updateTextBoxMessage('');
Expand All @@ -369,10 +373,6 @@ export default {
}
this.isRoomSkeletonActive = false;
}
if (newValue.uuid !== this.roomId && !this.discussionId) {
this.$router.replace({ name: 'room', params: { roomId: newValue.uuid } });
}
}
},
roomId: {
Expand Down

0 comments on commit 886a81a

Please sign in to comment.