Skip to content

Commit

Permalink
Merge pull request #4509 from nextcloud/backport/4503/stable26
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Jul 12, 2023
2 parents 0bb75e3 + bb269bc commit 3667fce
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 25 deletions.
4 changes: 2 additions & 2 deletions js/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/files-modal.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/files-modal.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions js/text-editors.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-editors.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,17 @@ export default {
this.$syncService = null
this.$attachmentResolver = null
},
beforeDestroy() {
async beforeDestroy() {
if (!this.richWorkspace) {
window.removeEventListener('beforeprint', this.preparePrinting)
window.removeEventListener('afterprint', this.preparePrinting)
}
unsubscribe('text:image-node:add', this.onAddImageNode)
unsubscribe('text:image-node:delete', this.onDeleteImageNode)
if (this.dirty) {
const timeout = new Promise((resolve) => setTimeout(resolve, 2000))
await Promise.any([timeout, this.$syncService.save()])
}
this.$providers.forEach(p => p.destroy())
},
methods: {
Expand Down
2 changes: 0 additions & 2 deletions src/services/SyncService.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,6 @@ class SyncService {

async close() {
this.backend?.disconnect()
const timeout = new Promise((resolve) => setTimeout(resolve, 2000))
await Promise.any([timeout, this.save()])
return this._close()
}

Expand Down
2 changes: 1 addition & 1 deletion src/views/DirectEditing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default {
async close() {
this.saving = true
setTimeout(async () => {
await this.$refs.editor.close()
await this.$refs.editor.$destroy()
callMobileMessage('close')
}, 0)
},
Expand Down

0 comments on commit 3667fce

Please sign in to comment.