fix: Cannot open conversation from contact sidebar. (#10102)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Sivin Varghese
2024-09-13 17:58:23 +05:30
committed by GitHub
parent aa4edaa1e6
commit aaab2ac788

View File

@@ -15,6 +15,14 @@ export default {
PopOverSearch, PopOverSearch,
CmdBarConversationSnooze, CmdBarConversationSnooze,
}, },
beforeRouteLeave(to, from, next) {
// Clear selected state if navigating away from a conversation to a route without a conversationId to prevent stale data issues
// and resolves timing issues during navigation with conversation view and other screens
if (this.conversationId) {
this.$store.dispatch('clearSelectedState');
}
next(); // Continue with navigation
},
props: { props: {
inboxId: { inboxId: {
type: [String, Number], type: [String, Number],