Layout.rightMargin: root.horizontalPadding
EnforcedPlainTextLabel {
- visible: shareModel.displayFileOwner
- text: qsTr("Shared with you by %1").arg(shareModel.fileOwnerDisplayName)
+ visible: shareModel.displayShareOwner
+ text: qsTr("Shared with you by %1").arg(shareModel.shareOwnerDisplayName)
}
EnforcedPlainTextLabel {
visible: shareModel.sharedWithMeExpires
text: qsTr("Expires in %1").arg(shareModel.sharedWithMeRemainingTimeString)
}
- visible: shareModel.displayFileOwner
+ visible: shareModel.displayShareOwner
}
ShareeSearchField {
_fetchOngoing = false;
_hasInitialShareFetchCompleted = false;
_sharees.clear();
- _displayFileOwner = false;
- _fileOwnerDisplayName.clear();
+ _displayShareOwner = false;
+ _shareOwnerDisplayName.clear();
_sharedWithMeExpires = false;
_sharedWithMeRemainingTimeString.clear();
Q_EMIT fetchOngoingChanged();
Q_EMIT hasInitialShareFetchCompletedChanged();
Q_EMIT shareesChanged();
- Q_EMIT displayFileOwnerChanged();
- Q_EMIT fileOwnerDisplayNameChanged();
+ Q_EMIT displayShareOwnerChanged();
+ Q_EMIT shareOwnerDisplayNameChanged();
Q_EMIT sharedWithMeExpiresChanged();
Q_EMIT sharedWithMeRemainingTimeStringChanged();
const auto privateLinkUrl = result["privatelink"].toString();
_fileRemoteId = result["fileid"].toByteArray();
-
- _displayFileOwner = result["owner-id"].toString() != _accountState->account()->davUser();
- Q_EMIT displayFileOwnerChanged();
- _fileOwnerDisplayName = result["owner-display-name"].toString();
- Q_EMIT fileOwnerDisplayNameChanged();
-
+
if (!privateLinkUrl.isEmpty()) {
qCInfo(lcShareModel) << "Received private link url for" << _sharePath << privateLinkUrl;
_privateLinkUrl = privateLinkUrl;
if (share.isNull()) {
continue;
} else if (const auto selfUserId = _accountState->account()->davUser(); share->getUidOwner() != selfUserId) {
+ _displayShareOwner = true;
+ Q_EMIT displayShareOwnerChanged();
+ _shareOwnerDisplayName = share->getOwnerDisplayName();
+ Q_EMIT shareOwnerDisplayNameChanged();
+
if (share->getShareType() == Share::TypeUser &&
share->getShareWith() &&
share->getShareWith()->shareWith() == selfUserId)
return _isShareDisabledEncryptedFolder;
}
-bool ShareModel::displayFileOwner() const
+bool ShareModel::displayShareOwner() const
{
- return _displayFileOwner;
+ return _displayShareOwner;
}
-QString ShareModel::fileOwnerDisplayName() const
+QString ShareModel::shareOwnerDisplayName() const
{
- return _fileOwnerDisplayName;
+ return _shareOwnerDisplayName;
}
QString ShareModel::sharedWithMeRemainingTimeString() const
Q_PROPERTY(bool hasInitialShareFetchCompleted READ hasInitialShareFetchCompleted NOTIFY hasInitialShareFetchCompletedChanged)
Q_PROPERTY(bool serverAllowsResharing READ serverAllowsResharing NOTIFY serverAllowsResharingChanged)
Q_PROPERTY(QVariantList sharees READ sharees NOTIFY shareesChanged)
- Q_PROPERTY(bool displayFileOwner READ displayFileOwner NOTIFY displayFileOwnerChanged)
- Q_PROPERTY(QString fileOwnerDisplayName READ fileOwnerDisplayName NOTIFY fileOwnerDisplayNameChanged)
+ Q_PROPERTY(bool displayShareOwner READ displayShareOwner NOTIFY displayShareOwnerChanged)
+ Q_PROPERTY(QString shareOwnerDisplayName READ shareOwnerDisplayName NOTIFY shareOwnerDisplayNameChanged)
Q_PROPERTY(bool sharedWithMeExpires READ sharedWithMeExpires NOTIFY sharedWithMeExpiresChanged)
Q_PROPERTY(QString sharedWithMeRemainingTimeString READ sharedWithMeRemainingTimeString NOTIFY sharedWithMeRemainingTimeStringChanged)
[[nodiscard]] QVariantList sharees() const;
- [[nodiscard]] bool displayFileOwner() const;
- [[nodiscard]] QString fileOwnerDisplayName() const;
+ [[nodiscard]] bool displayShareOwner() const;
+ [[nodiscard]] QString shareOwnerDisplayName() const;
[[nodiscard]] bool sharedWithMeExpires() const;
[[nodiscard]] QString sharedWithMeRemainingTimeString() const;
void shareesChanged();
void internalLinkReady();
void serverAllowsResharingChanged();
- void displayFileOwnerChanged();
- void fileOwnerDisplayNameChanged();
+ void displayShareOwnerChanged();
+ void shareOwnerDisplayNameChanged();
void sharedWithMeExpiresChanged();
void sharedWithMeRemainingTimeStringChanged();
SyncJournalFileLockInfo _filelockState;
QString _privateLinkUrl;
QByteArray _fileRemoteId;
- bool _displayFileOwner = false;
- QString _fileOwnerDisplayName;
+ bool _displayShareOwner = false;
+ QString _shareOwnerDisplayName;
bool _sharedWithMeExpires = false;
QString _sharedWithMeRemainingTimeString;