Skip to content

Commit

Permalink
Automatically open single file share app
Browse files Browse the repository at this point in the history
When opening the single file view, it automatically opens the default app.
It was discussed that this would not come upstream, but apparently it's already there...
  • Loading branch information
elizavetaRa authored and diocas committed Jun 1, 2023
1 parent e1e06aa commit b29df64
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/web-app-files/src/views/spaces/GenericSpace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,19 @@ export default defineComponent({
paginatedResources: function () {
if (this.isSingleFile) {
this.SET_FILE_SELECTION(this.paginatedResources)
const defaultAction = this.$_fileActions_getDefaultAction({
space: this.space,
resources: this.paginatedResources
}).label()
if (!this.$route.query.scrollTo && defaultAction !== 'Download') {
this.$_fileActions_triggerDefaultAction({
space: this.space,
resources: this.paginatedResources,
sameTab: true
})
}
}
}
},
Expand Down

0 comments on commit b29df64

Please sign in to comment.