mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 04:08:54 +03:00
Set sharingAvailable property in FileDetails from Folder account capabilities
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
38d82dfb5f
commit
4bcff7d991
1 changed files with 3 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue