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:
Claudio Cambra 2024-10-21 01:48:44 +08:00
parent cec497073e
commit 7ff1d011c0
No known key found for this signature in database
GPG key ID: C839200C384636B0

View file

@ -490,11 +490,16 @@ void ShareModel::slotSharesFetched(const QList<SharePtr> &shares)
for (const auto &share : shares) {
if (share.isNull()) {
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;
Q_EMIT displayShareOwnerChanged();
_shareOwnerDisplayName = share->getOwnerDisplayName();
Q_EMIT shareOwnerDisplayNameChanged();
_shareOwnerAvatar = "image://avatars/user-id="
+ share->getUidOwner()
+ "/local-account:"
+ share->account()->displayName();
Q_EMIT shareOwnerAvatarChanged();
if (share->getShareType() == Share::TypeUser &&
share->getShareWith() &&
@ -512,11 +517,10 @@ void ShareModel::slotSharesFetched(const QList<SharePtr> &shares)
: tr("Today");
Q_EMIT sharedWithMeRemainingTimeStringChanged();
}
continue;
}
} else {
slotAddShare(share);
}
}
handleLinkShare();
}