From 9c9158e6b78c69835cb7280810819fb2cd6f84f7 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 28 Oct 2015 17:43:36 +0100 Subject: Fix icon update to be more consistent Makes the details bar show the same icon as in the list. --- apps/files_sharing/js/share.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'apps/files_sharing/js') diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 30a803f3207..63225a0d8ec 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -130,6 +130,13 @@ // remove icon, if applicable OC.Share.markFileAsShared($tr, false, false); } + var newIcon = $tr.attr('data-icon'); + // in case markFileAsShared decided to change the icon, + // we need to modify the model + // (FIXME: yes, this is hacky) + if (fileInfoModel.get('icon') !== newIcon) { + fileInfoModel.set('icon', newIcon); + } }); fileList.registerTabView(shareTab); }, -- cgit v1.2.3