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 13, 2024
1 parent bac5df4 commit 544864a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions src/views/FaceContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,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,
})
Expand Down
6 changes: 1 addition & 5 deletions src/views/UnassignedFaces.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,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,
})
Expand Down

0 comments on commit 544864a

Please sign in to comment.