From 980c7157dd24bb1000fa34dd4c7a84cd5d838822 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Wed, 8 May 2024 11:58:16 +0200 Subject: [PATCH] fix(faces): Fix call to Viewer.open fixes https://github.com/nextcloud/recognize/issues/1109 Signed-off-by: Marcel Klehr --- src/views/FaceContent.vue | 6 +----- src/views/UnassignedFaces.vue | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/views/FaceContent.vue b/src/views/FaceContent.vue index 87c8f61b6..d38a727de 100644 --- a/src/views/FaceContent.vue +++ b/src/views/FaceContent.vue @@ -304,12 +304,8 @@ export default { openViewer(fileId) { const file = this.files[fileId] OCA.Viewer.open({ - // remove /username/files/ from the start path: '/' + file.filename.split('/').slice(3).join('/'), - list: this.faceFileIds.map(fileId => ({ - ...this.files[fileId], - basename: this.files[fileId].basename.split('-').slice(1).join('-'), - })).filter(file => !file.sectionHeader), + list: this.faceFileIds.map(fileId => ({ ...this.files[fileId], filename: '/' + this.files[fileId].filename.split('/').slice(3).join('/') })), loadMore: file.loadMore ? async () => await file.loadMore(true) : () => [], canLoop: file.canLoop, }) diff --git a/src/views/UnassignedFaces.vue b/src/views/UnassignedFaces.vue index 69a65ce21..62c5d8080 100644 --- a/src/views/UnassignedFaces.vue +++ b/src/views/UnassignedFaces.vue @@ -199,12 +199,8 @@ export default { openViewer(fileId) { const file = this.files[fileId] OCA.Viewer.open({ - // remove /username/files/ from the start path: '/' + file.filename.split('/').slice(3).join('/'), - list: this.faceFileIds.map(fileId => ({ - ...this.files[fileId], - basename: this.files[fileId].basename.split('-').slice(1).join('-'), - })).filter(file => !file.sectionHeader), + list: this.faceFileIds.map(fileId => ({ ...this.files[fileId], filename: '/' + this.files[fileId].filename.split('/').slice(3).join('/') })), loadMore: file.loadMore ? async () => await file.loadMore(true) : () => [], canLoop: file.canLoop, })