Skip to content

Commit

Permalink
Merge pull request #10558 from nextcloud/backport/10557/master
Browse files Browse the repository at this point in the history
fix(RightSidebar) update active tab on mount and conversation change
  • Loading branch information
nickvergessen authored Sep 21, 2023
2 parents 7ce9eb2 + b38e4dc commit d1ceece
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
9 changes: 9 additions & 0 deletions src/components/RightSidebar/RightSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,15 @@ export default {
}
},

isOneToOne: {
immediate: true,
handler(value) {
if (value) {
this.activeTab = 'shared-items'
}
},
},

isInCall(newValue) {
if (newValue) {
// Set 'chat' tab as active, and switch to it if sidebar is open
Expand Down
20 changes: 16 additions & 4 deletions src/components/RightSidebar/SharedItems/SharedItemsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,22 @@ export default {
},

watch: {
active(newValue) {
if (newValue) {
this.getSharedItemsOverview()
}
active: {
immediate: true,
handler(newValue) {
if (newValue && this.token) {
this.getSharedItemsOverview()
}
},
},

token: {
immediate: true,
handler(newValue) {
if (newValue && this.active) {
this.getSharedItemsOverview()
}
},
},
},

Expand Down

0 comments on commit d1ceece

Please sign in to comment.