Skip to content

Commit

Permalink
fix(faces): Fix call to Viewer.open
Browse files Browse the repository at this point in the history
fixes nextcloud/recognize#1109

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed May 8, 2024
1 parent f09f78c commit b6644af
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/views/FaceContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -303,16 +303,12 @@ 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),
loadMore: file.loadMore ? async () => await file.loadMore(true) : () => [],
canLoop: file.canLoop,
})
OCA.Viewer.open({
path: '/' + file.filename.split('/').slice(3).join('/'),
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,
})
},
async handleRemoveFilesFromFace(fileIds) {
Expand Down

0 comments on commit b6644af

Please sign in to comment.