Skip to content

Commit

Permalink
Merge pull request #10557 from nextcloud/fix/noid/active-tab
Browse files Browse the repository at this point in the history
check on load and covnersation change, if shared items is active
  • Loading branch information
nickvergessen authored Sep 21, 2023
2 parents be2248a + 739b66d commit fd9969c
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 @@ -145,10 +145,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 fd9969c

Please sign in to comment.