From 97ae48e17d0c4ce4808198d84cd86876f20431d5 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Mon, 21 Oct 2024 01:48:44 +0800 Subject: [PATCH] Build shareOwnerAvatar image provider string when handling sharedWithMe share in ShareModel Signed-off-by: Claudio Cambra --- src/gui/filedetails/sharemodel.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gui/filedetails/sharemodel.cpp b/src/gui/filedetails/sharemodel.cpp index 27e5df9c9..d0eb7fb58 100644 --- a/src/gui/filedetails/sharemodel.cpp +++ b/src/gui/filedetails/sharemodel.cpp @@ -491,11 +491,16 @@ void ShareModel::slotSharesFetched(const QList &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() && @@ -513,10 +518,9 @@ void ShareModel::slotSharesFetched(const QList &shares) : tr("Today"); Q_EMIT sharedWithMeRemainingTimeStringChanged(); } - continue; + } else { + slotAddShare(share); } - - slotAddShare(share); } // Perform forward pass on shares and check for duplicate display names; store these indeces so