mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 06:55:59 +03:00
only add Encrypt context menu entry for top folder in settings dialog
will omit Encrypt menu item for child fodlers as displayed in selective sync folders tree in settings dialog Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
df7d5c5814
commit
155e8227f6
1 changed files with 2 additions and 1 deletions
|
@ -584,8 +584,9 @@ void AccountSettings::slotSubfolderContextMenuRequested(const QModelIndex& index
|
|||
|
||||
const auto isEncrypted = info->isEncrypted();
|
||||
const auto isParentEncrypted = _model->isAnyAncestorEncrypted(index);
|
||||
const auto isTopFolder = index.parent().isValid() && !index.parent().parent().isValid();
|
||||
|
||||
if (!isEncrypted && !isParentEncrypted) {
|
||||
if (!isEncrypted && !isParentEncrypted && isTopFolder) {
|
||||
ac = menu.addAction(tr("Encrypt"));
|
||||
connect(ac, &QAction::triggered, [this, info] { slotMarkSubfolderEncrypted(info); });
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue