|
@@ -1139,18 +1139,16 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
|
Log_OC.d(TAG, "no public key for " + user.getAccountName());
|
|
Log_OC.d(TAG, "no public key for " + user.getAccountName());
|
|
|
|
|
|
FragmentManager fragmentManager = getParentFragmentManager();
|
|
FragmentManager fragmentManager = getParentFragmentManager();
|
|
- if (fragmentManager.findFragmentByTag(SETUP_ENCRYPTION_DIALOG_TAG) == null) {
|
|
|
|
- if (requireActivity() instanceof FileActivity fileActivity) {
|
|
|
|
- fileActivity.connectivityService.isNetworkAndServerAvailable(result -> {
|
|
|
|
- if (result) {
|
|
|
|
- SetupEncryptionDialogFragment dialog = SetupEncryptionDialogFragment.newInstance(user, position);
|
|
|
|
- dialog.setTargetFragment(this, SETUP_ENCRYPTION_REQUEST_CODE);
|
|
|
|
- dialog.show(fragmentManager, SETUP_ENCRYPTION_DIALOG_TAG);
|
|
|
|
- } else {
|
|
|
|
- DisplayUtils.showSnackMessage(fileActivity, R.string.encrypted_folder_setup_no_internet_error);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ if (fragmentManager.findFragmentByTag(SETUP_ENCRYPTION_DIALOG_TAG) == null && requireActivity() instanceof FileActivity fileActivity) {
|
|
|
|
+ fileActivity.connectivityService.isNetworkAndServerAvailable(result -> {
|
|
|
|
+ if (result) {
|
|
|
|
+ SetupEncryptionDialogFragment dialog = SetupEncryptionDialogFragment.newInstance(user, position);
|
|
|
|
+ dialog.setTargetFragment(this, SETUP_ENCRYPTION_REQUEST_CODE);
|
|
|
|
+ dialog.show(fragmentManager, SETUP_ENCRYPTION_DIALOG_TAG);
|
|
|
|
+ } else {
|
|
|
|
+ DisplayUtils.showSnackMessage(fileActivity, R.string.encrypted_folder_setup_no_internet_error);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|