mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-18 20:02:17 +03:00
Build shareOwnerAvatar image provider string when handling sharedWithMe share in ShareModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
cec497073e
commit
7ff1d011c0
1 changed files with 8 additions and 4 deletions
|
@ -490,11 +490,16 @@ void ShareModel::slotSharesFetched(const QList<SharePtr> &shares)
|
||||||
for (const auto &share : shares) {
|
for (const auto &share : shares) {
|
||||||
if (share.isNull()) {
|
if (share.isNull()) {
|
||||||
continue;
|
continue;
|
||||||
} else if (const auto selfUserId = _accountState->account()->davUser(); share->getUidOwner() != selfUserId) {
|
} else if (const auto selfUserId = share->account()->davUser(); share->getUidOwner() != selfUserId) {
|
||||||
_displayShareOwner = true;
|
_displayShareOwner = true;
|
||||||
Q_EMIT displayShareOwnerChanged();
|
Q_EMIT displayShareOwnerChanged();
|
||||||
_shareOwnerDisplayName = share->getOwnerDisplayName();
|
_shareOwnerDisplayName = share->getOwnerDisplayName();
|
||||||
Q_EMIT shareOwnerDisplayNameChanged();
|
Q_EMIT shareOwnerDisplayNameChanged();
|
||||||
|
_shareOwnerAvatar = "image://avatars/user-id="
|
||||||
|
+ share->getUidOwner()
|
||||||
|
+ "/local-account:"
|
||||||
|
+ share->account()->displayName();
|
||||||
|
Q_EMIT shareOwnerAvatarChanged();
|
||||||
|
|
||||||
if (share->getShareType() == Share::TypeUser &&
|
if (share->getShareType() == Share::TypeUser &&
|
||||||
share->getShareWith() &&
|
share->getShareWith() &&
|
||||||
|
@ -512,10 +517,9 @@ void ShareModel::slotSharesFetched(const QList<SharePtr> &shares)
|
||||||
: tr("Today");
|
: tr("Today");
|
||||||
Q_EMIT sharedWithMeRemainingTimeStringChanged();
|
Q_EMIT sharedWithMeRemainingTimeStringChanged();
|
||||||
}
|
}
|
||||||
continue;
|
} else {
|
||||||
|
slotAddShare(share);
|
||||||
}
|
}
|
||||||
|
|
||||||
slotAddShare(share);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleLinkShare();
|
handleLinkShare();
|
||||||
|
|
Loading…
Reference in a new issue