summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-10-23 11:41:47 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-10-29 13:20:08 +0100
commit51960cb228760d79ed70996a7a87f8719af8230c (patch)
tree271f48ccf154801134ed80330da8bd3d6a32f68c /apps
parent12eba18bdfc52b49dcc7c0a8eb2bd97dd6fddc26 (diff)
downloadnextcloud-server-51960cb228760d79ed70996a7a87f8719af8230c.tar.gz
nextcloud-server-51960cb228760d79ed70996a7a87f8719af8230c.zip
Fix triggering favorite file actions on the file list
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/files/src/views/Sidebar.vue7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files/src/views/Sidebar.vue b/apps/files/src/views/Sidebar.vue
index e99389de75f..879f71d8a12 100644
--- a/apps/files/src/views/Sidebar.vue
+++ b/apps/files/src/views/Sidebar.vue
@@ -315,6 +315,13 @@ export default {
${state ? '</d:set>' : '</d:remove>'}
</d:propertyupdate>`
})
+
+ // TODO: Obliterate as soon as possible and use events with new files app
+ // Terrible fallback for legacy files: toggle filelist as well
+ if (OCA.Files && OCA.Files.App && OCA.Files.App.fileList && OCA.Files.App.fileList.fileActions) {
+ OCA.Files.App.fileList.fileActions.triggerAction('Favorite', OCA.Files.App.fileList.getModelForFile(this.fileInfo.name), OCA.Files.App.fileList)
+ }
+
} catch (error) {
OC.Notification.showTemporary(t('files', 'Unable to change the favourite state of the file'))
console.error('Unable to change favourite state', error)