]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
Set sharingAvailable property in FileDetails from Folder account capabilities
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Thu, 13 Jul 2023 01:28:54 +0000 (09:28 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Tue, 18 Jul 2023 13:49:17 +0000 (15:49 +0200)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/filedetails/filedetails.cpp

index 2e24dc26590c87c7e8c295813013126aa778a722..58c1854ea8c0ceed7467bc87de3c50cc020d7fc2 100644 (file)
@@ -62,6 +62,7 @@ void FileDetails::setLocalPath(const QString &localPath)
     connect(&_fileWatcher, &QFileSystemWatcher::fileChanged, this, &FileDetails::refreshFileDetails);
 
     const auto folder = FolderMan::instance()->folderForPath(_localPath);
+    Q_ASSERT(folder);
     const auto file = _localPath.mid(folder->cleanPath().length() + 1);
 
     if (!folder->journalDb()->getFileRecord(file, &_fileRecord)) {
@@ -74,6 +75,8 @@ void FileDetails::setLocalPath(const QString &localPath)
     updateLockExpireString();
     updateFileTagModel(folder);
 
+    _sharingAvailable = folder->accountState()->account()->capabilities().shareAPI();
+
     Q_EMIT fileChanged();
 }