Rename fun in Callback for clarity.
This commit is contained in:
parent
353c00e032
commit
43972dba68
104 changed files with 658 additions and 664 deletions
|
|
@ -77,19 +77,19 @@ class SecureBackupFlowNode(
|
|||
return when (navTarget) {
|
||||
NavTarget.Root -> {
|
||||
val callback = object : SecureBackupRootNode.Callback {
|
||||
override fun onSetupClick() {
|
||||
override fun navigateToSetup() {
|
||||
backstack.push(NavTarget.Setup)
|
||||
}
|
||||
|
||||
override fun onChangeClick() {
|
||||
override fun navigateToChange() {
|
||||
backstack.push(NavTarget.Change)
|
||||
}
|
||||
|
||||
override fun onDisableClick() {
|
||||
override fun navigateToDisable() {
|
||||
backstack.push(NavTarget.Disable)
|
||||
}
|
||||
|
||||
override fun onConfirmRecoveryKeyClick() {
|
||||
override fun navigateToEnterRecoveryKey() {
|
||||
backstack.push(NavTarget.EnterRecoveryKey)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,26 +32,26 @@ class SecureBackupRootNode(
|
|||
plugins = plugins
|
||||
) {
|
||||
interface Callback : Plugin {
|
||||
fun onSetupClick()
|
||||
fun onChangeClick()
|
||||
fun onDisableClick()
|
||||
fun onConfirmRecoveryKeyClick()
|
||||
fun navigateToSetup()
|
||||
fun navigateToChange()
|
||||
fun navigateToDisable()
|
||||
fun navigateToEnterRecoveryKey()
|
||||
}
|
||||
|
||||
private fun onSetupClick() {
|
||||
plugins<Callback>().forEach { it.onSetupClick() }
|
||||
plugins<Callback>().forEach { it.navigateToSetup() }
|
||||
}
|
||||
|
||||
private fun onChangeClick() {
|
||||
plugins<Callback>().forEach { it.onChangeClick() }
|
||||
plugins<Callback>().forEach { it.navigateToChange() }
|
||||
}
|
||||
|
||||
private fun onDisableClick() {
|
||||
plugins<Callback>().forEach { it.onDisableClick() }
|
||||
plugins<Callback>().forEach { it.navigateToDisable() }
|
||||
}
|
||||
|
||||
private fun onConfirmRecoveryKeyClick() {
|
||||
plugins<Callback>().forEach { it.onConfirmRecoveryKeyClick() }
|
||||
plugins<Callback>().forEach { it.navigateToEnterRecoveryKey() }
|
||||
}
|
||||
|
||||
private fun onLearnMoreClick(uriHandler: UriHandler) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue