Remove "Reset keys" developer action
This commit is contained in:
parent
a233e9b0a0
commit
b1e1b4a7dc
vector/src/main/java/im/vector/riotx/features/settings/crosssigning
38
vector/src/main/java/im/vector/riotx/features/settings/crosssigning/CrossSigningEpoxyController.kt
38
vector/src/main/java/im/vector/riotx/features/settings/crosssigning/CrossSigningEpoxyController.kt
@ -37,7 +37,6 @@ class CrossSigningEpoxyController @Inject constructor(
|
|||||||
|
|
||||||
interface InteractionListener {
|
interface InteractionListener {
|
||||||
fun onInitializeCrossSigningKeys()
|
fun onInitializeCrossSigningKeys()
|
||||||
fun onResetCrossSigningKeys()
|
|
||||||
fun verifySession()
|
fun verifySession()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,18 +50,6 @@ class CrossSigningEpoxyController @Inject constructor(
|
|||||||
titleIconResourceId(R.drawable.ic_shield_trusted)
|
titleIconResourceId(R.drawable.ic_shield_trusted)
|
||||||
title(stringProvider.getString(R.string.encryption_information_dg_xsigning_complete))
|
title(stringProvider.getString(R.string.encryption_information_dg_xsigning_complete))
|
||||||
}
|
}
|
||||||
if (vectorPreferences.developerMode() && !data.isUploadingKeys) {
|
|
||||||
bottomSheetVerificationActionItem {
|
|
||||||
id("resetkeys")
|
|
||||||
title(stringProvider.getString(R.string.reset_cross_signing))
|
|
||||||
titleColor(colorProvider.getColor(R.color.riotx_destructive_accent))
|
|
||||||
iconRes(R.drawable.ic_arrow_right)
|
|
||||||
iconColor(colorProvider.getColor(R.color.riotx_destructive_accent))
|
|
||||||
listener {
|
|
||||||
interactionListener?.onResetCrossSigningKeys()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (data.xSigningKeysAreTrusted) {
|
} else if (data.xSigningKeysAreTrusted) {
|
||||||
genericItem {
|
genericItem {
|
||||||
id("trusted")
|
id("trusted")
|
||||||
@ -70,19 +57,6 @@ class CrossSigningEpoxyController @Inject constructor(
|
|||||||
title(stringProvider.getString(R.string.encryption_information_dg_xsigning_trusted))
|
title(stringProvider.getString(R.string.encryption_information_dg_xsigning_trusted))
|
||||||
}
|
}
|
||||||
if (!data.isUploadingKeys) {
|
if (!data.isUploadingKeys) {
|
||||||
if (vectorPreferences.developerMode()) {
|
|
||||||
bottomSheetVerificationActionItem {
|
|
||||||
id("resetkeys")
|
|
||||||
title(stringProvider.getString(R.string.reset_cross_signing))
|
|
||||||
titleColor(colorProvider.getColor(R.color.riotx_destructive_accent))
|
|
||||||
iconRes(R.drawable.ic_arrow_right)
|
|
||||||
iconColor(colorProvider.getColor(R.color.riotx_destructive_accent))
|
|
||||||
listener {
|
|
||||||
interactionListener?.onResetCrossSigningKeys()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bottomSheetVerificationActionItem {
|
bottomSheetVerificationActionItem {
|
||||||
id("verify")
|
id("verify")
|
||||||
title(stringProvider.getString(R.string.complete_security))
|
title(stringProvider.getString(R.string.complete_security))
|
||||||
@ -110,18 +84,6 @@ class CrossSigningEpoxyController @Inject constructor(
|
|||||||
interactionListener?.verifySession()
|
interactionListener?.verifySession()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (vectorPreferences.developerMode()) {
|
|
||||||
bottomSheetVerificationActionItem {
|
|
||||||
id("resetkeys")
|
|
||||||
title(stringProvider.getString(R.string.reset_cross_signing))
|
|
||||||
titleColor(colorProvider.getColor(R.color.riotx_destructive_accent))
|
|
||||||
iconRes(R.drawable.ic_arrow_right)
|
|
||||||
iconColor(colorProvider.getColor(R.color.riotx_destructive_accent))
|
|
||||||
listener {
|
|
||||||
interactionListener?.onResetCrossSigningKeys()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
genericItem {
|
genericItem {
|
||||||
id("not")
|
id("not")
|
||||||
|
10
vector/src/main/java/im/vector/riotx/features/settings/crosssigning/CrossSigningSettingsFragment.kt
10
vector/src/main/java/im/vector/riotx/features/settings/crosssigning/CrossSigningSettingsFragment.kt
@ -101,14 +101,4 @@ class CrossSigningSettingsFragment @Inject constructor(
|
|||||||
override fun verifySession() {
|
override fun verifySession() {
|
||||||
viewModel.handle(CrossSigningAction.VerifySession)
|
viewModel.handle(CrossSigningAction.VerifySession)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResetCrossSigningKeys() {
|
|
||||||
AlertDialog.Builder(requireContext())
|
|
||||||
.setTitle(R.string.dialog_title_confirmation)
|
|
||||||
.setMessage(R.string.are_you_sure)
|
|
||||||
.setPositiveButton(R.string.ok) { _, _ ->
|
|
||||||
viewModel.handle(CrossSigningAction.InitializeCrossSigning)
|
|
||||||
}
|
|
||||||
.show()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user