Try to improve readability
This commit is contained in:
parent
352662d19a
commit
7193db8344
@ -129,15 +129,12 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun refresh4SSection(info: SecretsSynchronisationInfo) {
|
private fun refresh4SSection(info: SecretsSynchronisationInfo) {
|
||||||
secureBackupCategory.isVisible = false
|
|
||||||
|
|
||||||
// it's a lot of if / else if / else
|
// it's a lot of if / else if / else
|
||||||
// But it's not yet clear how to manage all cases
|
// But it's not yet clear how to manage all cases
|
||||||
if (!info.isCrossSigningEnabled) {
|
if (!info.isCrossSigningEnabled) {
|
||||||
// There is not cross signing, so we can remove the section
|
// There is not cross signing, so we can remove the section
|
||||||
|
secureBackupCategory.isVisible = false
|
||||||
} else {
|
} else {
|
||||||
secureBackupCategory.isVisible = true
|
|
||||||
|
|
||||||
if (!info.isBackupSetup) {
|
if (!info.isBackupSetup) {
|
||||||
if (info.isCrossSigningEnabled && info.allPrivateKeysKnown) {
|
if (info.isCrossSigningEnabled && info.allPrivateKeysKnown) {
|
||||||
// You can setup recovery!
|
// You can setup recovery!
|
||||||
@ -154,9 +151,7 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor(
|
|||||||
// you should synchronize to get gossips
|
// you should synchronize to get gossips
|
||||||
secureBackupCategory.isVisible = false
|
secureBackupCategory.isVisible = false
|
||||||
}
|
}
|
||||||
return
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
// so here we know that 4S is setup
|
// so here we know that 4S is setup
|
||||||
if (info.isCrossSigningTrusted && info.allPrivateKeysKnown) {
|
if (info.isCrossSigningTrusted && info.allPrivateKeysKnown) {
|
||||||
// Looks like we have all cross signing secrets and session is trusted
|
// Looks like we have all cross signing secrets and session is trusted
|
||||||
@ -187,7 +182,6 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor(
|
|||||||
} else {
|
} else {
|
||||||
secureBackupCategory.isVisible = false
|
secureBackupCategory.isVisible = false
|
||||||
}
|
}
|
||||||
return
|
|
||||||
} else {
|
} else {
|
||||||
// there is a backup, but this session is not trusted, or is missing some secrets
|
// there is a backup, but this session is not trusted, or is missing some secrets
|
||||||
// you should enter passphrase to get them or verify against another session
|
// you should enter passphrase to get them or verify against another session
|
||||||
@ -204,6 +198,7 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun bindPref() {
|
override fun bindPref() {
|
||||||
// Push target
|
// Push target
|
||||||
|
Loading…
x
Reference in New Issue
Block a user