Q_EMIT shareesChanged();
}
-QString ShareModel::displayStringForShare(const SharePtr &share) const
+QString ShareModel::displayStringForShare(const SharePtr &share, const bool verbose) const
{
if (const auto linkShare = share.objectCast<LinkShare>()) {
} else if (share->getShareType() == Share::TypeSecureFileDropPlaceholderLink) {
return tr("Secure file drop");
} else if (share->getShareWith()) {
- return share->getShareWith()->format();
+ const auto sharee = share->getShareWith();
+ return verbose ? QString{"%1 (%2)"}.arg(sharee->format(), sharee->shareWith()) : sharee->format();
}
qCWarning(lcShareModel) << "Unable to provide good display string for share";
void slotDeleteE2EeShare(const SharePtr &share) const;
private:
- [[nodiscard]] QString displayStringForShare(const SharePtr &share) const;
+ [[nodiscard]] QString displayStringForShare(const SharePtr &share, bool verbose = false) const;
[[nodiscard]] QString iconUrlForShare(const SharePtr &share) const;
[[nodiscard]] QString avatarUrlForShare(const SharePtr &share) const;
[[nodiscard]] long long enforcedMaxExpireDateForShare(const SharePtr &share) const;