From c62e279224dac86dfb344eac91cfecc5316479e9 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 27 Aug 2019 11:37:39 +0200 Subject: [PATCH] Fix share modal friends list --- www/common/common-ui-elements.js | 9 +++++---- www/share/main.js | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index c742da570..fb2580a20 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -357,17 +357,18 @@ define([ if (curve.length <= 40) { return; } var data = friends[curve]; if (!data.notifications) { return; } + var name = data.displayName || Messages.anonymous; var avatar = h('span.cp-share-friend-avatar.cp-avatar'); - UIElements.displayAvatar(common, $(avatar), data.avatar, data.displayName); + UIElements.displayAvatar(common, $(avatar), data.avatar, name); return h('div.cp-share-friend', { 'data-curve': data.curvePublic, - 'data-name': data.displayName, + 'data-name': name, 'data-order': i, - title: data.displayName, + title: name, style: 'order:'+i+';' },[ avatar, - h('span.cp-share-friend-name', data.displayName) + h('span.cp-share-friend-name', name) ]); }).filter(function (x) { return x; }); var smallCurves = Object.keys(friends).map(function (c) { diff --git a/www/share/main.js b/www/share/main.js index 5b1c4fb38..43e514f58 100644 --- a/www/share/main.js +++ b/www/share/main.js @@ -85,6 +85,7 @@ define([ }).nThen(function (/*waitFor*/) { metaObj.doc = {}; var additionalPriv = { + fileHost: ApiConfig.fileHost, accountName: Utils.LocalStore.getAccountName(), origin: window.location.origin, pathname: window.location.pathname,