diff options
Diffstat (limited to 'apps/files_sharing/js/share.js')
-rw-r--r-- | apps/files_sharing/js/share.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 03ed02f41ef..68f6f3ba76f 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -1,11 +1,19 @@ $(document).ready(function() { - var disableSharing = $('#disableSharing').data('status'); + var disableSharing = $('#disableSharing').data('status'), + sharesLoaded = false; if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined' && !disableSharing) { - $('#fileList').on('fileActionsReady',function(){ - OC.Share.loadIcons('file'); + if (!sharesLoaded){ + OC.Share.loadIcons('file'); + // assume that we got all shares, so switching directories + // will not invalidate that list + sharesLoaded = true; + } + else{ + OC.Share.updateIcons('file'); + } }); FileActions.register('all', 'Share', OC.PERMISSION_READ, OC.imagePath('core', 'actions/share'), function(filename) { |