From 0ff91574d2db0d9429df2195dce58fcd5bf54d0d Mon Sep 17 00:00:00 2001 From: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> Date: Fri, 20 Sep 2019 18:50:32 +0200 Subject: [PATCH] show only 'shared with you by...' if it's not the current user itself Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> --- src/gui/shareusergroupwidget.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/gui/shareusergroupwidget.cpp b/src/gui/shareusergroupwidget.cpp index 1e808deaa6..82a3425f14 100644 --- a/src/gui/shareusergroupwidget.cpp +++ b/src/gui/shareusergroupwidget.cpp @@ -205,12 +205,9 @@ void ShareUserGroupWidget::slotSharesFetched(const QList> } // the owner of the file that shared it first - if(x == 0 && !share->getUidOwner().isEmpty()){ - if (_account->credentials()->user() == share->getUidOwner()) { - _ui->mainOwnerLabel->setText(QString("You shared this file")); - } else { - _ui->mainOwnerLabel->setText(QString("Shared with you by ").append(share->getOwnerDisplayName())); - } + // leave out if it's the current user + if(x == 0 && !share->getUidOwner().isEmpty() && !(share->getUidOwner() == _account->credentials()->user())) { + _ui->mainOwnerLabel->setText(QString("Shared with you by ").append(share->getOwnerDisplayName())); } ShareUserLine *s = new ShareUserLine(share, _maxSharingPermissions, _isFile, _parentScrollArea);