Skip to content

Commit b6644af

Browse files
committed
fix(faces): Fix call to Viewer.open
fixes nextcloud/recognize#1109 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent f09f78c commit b6644af

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

src/views/FaceContent.vue

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -303,16 +303,12 @@ export default {
303303
304304
openViewer(fileId) {
305305
const file = this.files[fileId]
306-
OCA.Viewer.open({
307-
// remove /username/files/ from the start
308-
path: '/' + file.filename.split('/').slice(3).join('/'),
309-
list: this.faceFileIds.map(fileId => ({
310-
...this.files[fileId],
311-
basename: this.files[fileId].basename.split('-').slice(1).join('-'),
312-
})).filter(file => !file.sectionHeader),
313-
loadMore: file.loadMore ? async () => await file.loadMore(true) : () => [],
314-
canLoop: file.canLoop,
315-
})
306+
OCA.Viewer.open({
307+
path: '/' + file.filename.split('/').slice(3).join('/'),
308+
list: this.faceFileIds.map(fileId => ({...this.files[fileId], filename: '/' + this.files[fileId].filename.split('/').slice(3).join('/')})),
309+
loadMore: file.loadMore ? async () => await file.loadMore(true) : () => [],
310+
canLoop: file.canLoop,
311+
})
316312
},
317313
318314
async handleRemoveFilesFromFace(fileIds) {

0 commit comments

Comments
 (0)