mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
Hide decrypt option since it does only work for empty folders
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
73969e2515
commit
92480ec8fb
1 changed files with 3 additions and 2 deletions
|
@ -511,12 +511,13 @@ void AccountSettings::slotSubfolderContextMenuRequested(const QModelIndex& index
|
|||
// Verify if the folder is empty before attempting to encrypt.
|
||||
|
||||
bool isEncrypted = acc->e2e()->isFolderEncrypted(info->_path);
|
||||
ac = menu.addAction( isEncrypted ? tr("Decrypt") : tr("Encrypt"));
|
||||
|
||||
if (!isEncrypted) {
|
||||
ac = menu.addAction(tr("Encrypt"));
|
||||
connect(ac, &QAction::triggered, [this, &info] { slotMarkSubfolderEncrpted(info); });
|
||||
} else {
|
||||
connect(ac, &QAction::triggered, [this, &info] { slotMarkSubfolderDecrypted(info); });
|
||||
// Ingore decrypting for now since it only works with an empty folder
|
||||
// connect(ac, &QAction::triggered, [this, &info] { slotMarkSubfolderDecrypted(info); });
|
||||
}
|
||||
}
|
||||
menu.exec(QCursor::pos());
|
||||
|
|
Loading…
Reference in a new issue