mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +03:00
hide e2e options after removing local e2e setup
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
b110735dcc
commit
f49252c87e
1 changed files with 8 additions and 2 deletions
|
@ -447,7 +447,9 @@ public class SettingsActivity extends PreferenceActivity
|
|||
Preference preference = findPreference("setup_e2e_keys_exist");
|
||||
|
||||
if (preference != null) {
|
||||
if (!CapabilityUtils.getCapability(this).getEndToEndEncryptionKeysExist().isTrue()) {
|
||||
if (!CapabilityUtils.getCapability(this).getEndToEndEncryptionKeysExist().isTrue() ||
|
||||
(CapabilityUtils.getCapability(this).getEndToEndEncryptionKeysExist().isTrue() &&
|
||||
FileOperationsHelper.isEndToEndEncryptionSetup(this, user))) {
|
||||
preferenceCategoryMore.removePreference(preference);
|
||||
} else {
|
||||
preference.setOnPreferenceClickListener(p -> {
|
||||
|
@ -501,10 +503,14 @@ public class SettingsActivity extends PreferenceActivity
|
|||
.setCancelable(true)
|
||||
.setNegativeButton(R.string.common_cancel, ((dialog, i) -> dialog.dismiss()))
|
||||
.setPositiveButton(R.string.confirm_removal, (dialog, which) -> {
|
||||
// do something
|
||||
EncryptionUtils.removeE2E(arbitraryDataProvider, user);
|
||||
preferenceCategoryMore.removePreference(preference);
|
||||
|
||||
Preference pMnemonic = findPreference("mnemonic");
|
||||
if (pMnemonic != null) {
|
||||
preferenceCategoryMore.removePreference(pMnemonic);
|
||||
}
|
||||
|
||||
dialog.dismiss();
|
||||
})
|
||||
.create();
|
||||
|
|
Loading…
Reference in a new issue