Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@nextcloud.com>2020-06-02 17:03:50 +0300
committerKevin Ottens (Rebase PR Action) <er-vin@users.noreply.github.com>2020-06-02 18:50:18 +0300
commit02a28325a89dec1c5d57ff0b3ee6ef3663cbd8be (patch)
tree5ba02c58445f643c4dfbd0661316497cb086cf5f /src/gui/folderstatusmodel.cpp
parentc800d9149eea045fe30ddff186bb2d00fae6712c (diff)
Show broken encryption icon only in non-empty folders
This should address Tobias' concerns regarding the icon being misleading. Now we basically do the following inside an encrypted folder parent: * encrypted folders get the encrypted icon; * non-encrypted empty folders get the regular folder icon; * non-encrypted non-empty folders get the broken encryption icon. Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Diffstat (limited to 'src/gui/folderstatusmodel.cpp')
-rw-r--r--src/gui/folderstatusmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp
index 52370bfa5..8d0c2e881 100644
--- a/src/gui/folderstatusmodel.cpp
+++ b/src/gui/folderstatusmodel.cpp
@@ -158,7 +158,7 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const
case Qt::DecorationRole:
if (_accountState->account()->e2e()->isFolderEncrypted(x._path)) {
return QIcon(QLatin1String(":/client/theme/lock-https.svg"));
- } else if (_accountState->account()->e2e()->isAnyParentFolderEncrypted(x._path)) {
+ } else if (x._size > 0 && _accountState->account()->e2e()->isAnyParentFolderEncrypted(x._path)) {
return QIcon(QLatin1String(":/client/theme/lock-broken.svg"));
}
return QFileIconProvider().icon(x._isExternal ? QFileIconProvider::Network : QFileIconProvider::Folder);