From 51960cb228760d79ed70996a7a87f8719af8230c Mon Sep 17 00:00:00 2001 From: =?utf8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Wed, 23 Oct 2019 11:41:47 +0200 Subject: [PATCH] Fix triggering favorite file actions on the file list MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- apps/files/src/views/Sidebar.vue | 7 +++++++ 1 file changed, 7 insertions(+) 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 ? '' : ''} ` }) + + // 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) -- 2.39.5