From 2d062daa11bdbbb1ac652e34869eaa0a1e550878 Mon Sep 17 00:00:00 2001 From: Daniel Calviño Sánchez <danxuliu@gmail.com> Date: Sun, 1 Jul 2018 17:50:18 +0200 Subject: Add custom handling for room shares to the list of sharees MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Like done for other types of shares, room shares are now explicitly described as such in the UI. The avatar used is the image provided in the "shareWithAvatar" property of the share. If none is given then the avatar is the first letter of the display name of the room share with a coloured background seeded from the room token. If the display name of the room is empty then no letter is shown in the avatar; no special handling is done in that case. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com> --- core/js/sharedialogshareelistview.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js index 2ed46f46768..2627d5fa662 100644 --- a/core/js/sharedialogshareelistview.js +++ b/core/js/sharedialogshareelistview.js @@ -243,6 +243,8 @@ } else if (shareType === OC.Share.SHARE_TYPE_EMAIL) { shareWithDisplayName = shareWithDisplayName + " (" + t('core', 'email') + ')'; } else if (shareType === OC.Share.SHARE_TYPE_CIRCLE) { + } else if (shareType === OC.Share.SHARE_TYPE_ROOM) { + shareWithDisplayName = shareWithDisplayName + " (" + t('core', 'conversation') + ')'; } if (shareType === OC.Share.SHARE_TYPE_GROUP) { @@ -291,7 +293,7 @@ shareWithTitle: shareWithTitle, shareType: shareType, shareId: this.model.get('shares')[shareIndex].id, - modSeed: shareType !== OC.Share.SHARE_TYPE_USER && (shareType !== OC.Share.SHARE_TYPE_CIRCLE || shareWithAvatar), + modSeed: shareWithAvatar || (shareType !== OC.Share.SHARE_TYPE_USER && shareType !== OC.Share.SHARE_TYPE_CIRCLE && shareType !== OC.Share.SHARE_TYPE_ROOM), isRemoteShare: shareType === OC.Share.SHARE_TYPE_REMOTE, isRemoteGroupShare: shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP, isNoteAvailable: shareType !== OC.Share.SHARE_TYPE_REMOTE && shareType !== OC.Share.SHARE_TYPE_REMOTE_GROUP, -- cgit v1.2.3