From 200a28255e058843465c63080d917170de293ee6 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Mon, 13 Feb 2017 17:49:05 -0600 Subject: Always enable avatars * we introduced this setting in the begining because our avatar support caused some performance issues, but we fixed them and should only provide one way how Nextcloud looks Signed-off-by: Morris Jobke --- core/js/shareconfigmodel.js | 3 ++- core/js/sharedialogresharerinfoview.js | 13 ++++--------- core/js/sharedialogshareelistview.js | 28 ++++++++++------------------ core/js/tests/specs/sharedialogviewSpec.js | 23 +---------------------- 4 files changed, 17 insertions(+), 50 deletions(-) (limited to 'core/js') diff --git a/core/js/shareconfigmodel.js b/core/js/shareconfigmodel.js index 7c92853f682..98388cbd508 100644 --- a/core/js/shareconfigmodel.js +++ b/core/js/shareconfigmodel.js @@ -33,9 +33,10 @@ /** * @returns {boolean} + * @deprecated here for legacy reasons - will always return true */ areAvatarsEnabled: function() { - return oc_config.enable_avatars === true; + return true; }, /** diff --git a/core/js/sharedialogresharerinfoview.js b/core/js/sharedialogresharerinfoview.js index 9a9d95cfb60..a82b495bdcc 100644 --- a/core/js/sharedialogresharerinfoview.js +++ b/core/js/sharedialogresharerinfoview.js @@ -17,9 +17,7 @@ var TEMPLATE = '' + - ' {{#if avatarEnabled}}' + '
' + - ' {{/if}}' + ' {{sharedByText}}' + '

' ; @@ -93,17 +91,14 @@ } this.$el.html(reshareTemplate({ - avatarEnabled: this.configModel.areAvatarsEnabled(), reshareOwner: this.model.getReshareOwner(), sharedByText: sharedByText })); - if(this.configModel.areAvatarsEnabled()) { - this.$el.find('.avatar').each(function() { - var $this = $(this); - $this.avatar($this.data('username'), 32); - }); - } + this.$el.find('.avatar').each(function() { + var $this = $(this); + $this.avatar($this.data('username'), 32); + }); return this; }, diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js index 4647dedd722..47dc62d14fe 100644 --- a/core/js/sharedialogshareelistview.js +++ b/core/js/sharedialogshareelistview.js @@ -21,9 +21,7 @@ '