mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
Merge pull request #438 from nextcloud/bugfix/413/hide-decrypt-option
Hide decrypt option since it does only work for empty folders
This commit is contained in:
commit
9eb950bdcf
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