mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 05:15:40 +03:00
Merge pull request #5972 from nextcloud/bugfix/encrypt-problem-folders
Fix user-facing message about why encryption cannot yet be done
This commit is contained in:
commit
32a2dd75f8
1 changed files with 11 additions and 3 deletions
|
@ -329,10 +329,18 @@ void AccountSettings::doExpand()
|
|||
}
|
||||
}
|
||||
|
||||
bool AccountSettings::canEncryptOrDecrypt(const FolderStatusModel::SubFolderInfo* info) {
|
||||
if (info->_folder->syncResult().status() != SyncResult::Status::Success) {
|
||||
bool AccountSettings::canEncryptOrDecrypt(const FolderStatusModel::SubFolderInfo *info)
|
||||
{
|
||||
if (const auto folderSyncStatus = info->_folder->syncResult().status(); folderSyncStatus != SyncResult::Status::Success) {
|
||||
auto message = tr("Please wait for the folder to sync before trying to encrypt it.");
|
||||
if (folderSyncStatus == SyncResult::Status::Problem) {
|
||||
message = tr("The folder has a minor sync problem. Encryption of this folder will be possible once it has synced successfully");
|
||||
} else if (folderSyncStatus == SyncResult::Status::Error) {
|
||||
message = tr("The folder has a sync error. Encryption of this folder will be possible once it has synced successfully");
|
||||
}
|
||||
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText("Please wait for the folder to sync before trying to encrypt it.");
|
||||
msgBox.setText(message);
|
||||
msgBox.exec();
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue