Skip to content

Commit

Permalink
Merge pull request #1848 from nextcloud/backport/1806/stable27
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Aug 8, 2023
2 parents cbe906f + 07a1327 commit f484a35
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions js/viewer-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viewer-main.js.map

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions src/views/Viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
:data-handler="handlerId">
<component :is="currentFile.modal"
v-if="!currentFile.failed"
:key="currentFile.fileid"
:key="currentFile | uniqueKey"
ref="content"
:active="true"
:can-swipe="false"
Expand Down Expand Up @@ -115,7 +115,7 @@
<!-- PREVIOUS -->
<component :is="previousFile.modal"
v-if="previousFile && !previousFile.failed"
:key="previousFile.fileid"
:key="previousFile | uniqueKey"
ref="previous-content"
v-bind="previousFile"
:file-list="fileList"
Expand All @@ -128,7 +128,7 @@
<!-- CURRENT -->
<component :is="currentFile.modal"
v-if="!currentFile.failed"
:key="currentFile.fileid"
:key="currentFile | uniqueKey"
ref="content"
v-bind="currentFile"
:active="true"
Expand All @@ -147,7 +147,7 @@
<!-- NEXT -->
<component :is="nextFile.modal"
v-if="nextFile && !nextFile.failed"
:key="nextFile.fileid"
:key="nextFile | uniqueKey"
ref="next-content"
v-bind="nextFile"
:file-list="fileList"
Expand Down Expand Up @@ -207,6 +207,12 @@ export default {
Pencil,
},
filters: {
uniqueKey(file) {
return file.fileid || file.source
},
},
mixins: [isFullscreen, isMobile],
data() {
Expand Down

0 comments on commit f484a35

Please sign in to comment.