Skip to content

Commit

Permalink
Merge pull request #1708 from nextcloud/backport/1707/stable27
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv committed Jun 7, 2023
2 parents 0d6e41d + de63247 commit 2427b5e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 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.

4 changes: 2 additions & 2 deletions src/components/ImageEditor.vue
Expand Up @@ -172,10 +172,10 @@ export default {
logger.info('Edited image saved!', { response })
showSuccess(t('viewer', 'Image saved'))
if (putUrl !== this.src) {
emit('files:file:created', { fileid: parseInt(response?.headers?.['oc-fileid']?.split('oc')[0]) || null })
emit('files:node:created', { fileid: parseInt(response?.headers?.['oc-fileid']?.split('oc')[0]) || null })
} else {
this.$emit('updated')
emit('files:file:updated', { fileid: this.fileid })
emit('files:node:updated', { fileid: this.fileid })
}
} catch (error) {
logger.error('Error saving image', { error })
Expand Down
2 changes: 1 addition & 1 deletion src/views/Viewer.vue
Expand Up @@ -976,7 +976,7 @@ export default {
const url = this.source ?? this.currentFile.davPath
await axios.delete(url)
emit('files:file:deleted', { fileid })
emit('files:node:deleted', { fileid })
// fileid is not unique, basename is
const currentIndex = this.fileList.findIndex(file => file.basename === this.currentFile.basename)
Expand Down

0 comments on commit 2427b5e

Please sign in to comment.