Add displayFileOwner property to ShareModel

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-10-20 17:28:13 +08:00
parent f5be72019b
commit f0533a5ab1
2 changed files with 9 additions and 0 deletions

View File

@ -1379,6 +1379,11 @@ bool ShareModel::isShareDisabledEncryptedFolder() const
return _isShareDisabledEncryptedFolder;
}
bool ShareModel::displayFileOwner() const
{
return _displayFileOwner;
}
QVariantList ShareModel::sharees() const
{
QVariantList returnSharees;

View File

@ -38,6 +38,7 @@ class ShareModel : public QAbstractListModel
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)
public:
enum Roles {
@ -126,6 +127,7 @@ public:
[[nodiscard]] QVariantList sharees() const;
[[nodiscard]] bool displayFileOwner() const;
[[nodiscard]] Q_INVOKABLE static QString generatePassword();
signals:
@ -143,6 +145,7 @@ signals:
void shareesChanged();
void internalLinkReady();
void serverAllowsResharingChanged();
void displayFileOwnerChanged();
void serverError(const int code, const QString &message) const;
void passwordSetError(const QString &shareId, const int code, const QString &message);
@ -246,6 +249,7 @@ private:
SyncJournalFileLockInfo _filelockState;
QString _privateLinkUrl;
QByteArray _fileRemoteId;
bool _displayFileOwner = false;
QSharedPointer<ShareManager> _manager;