Fix being stuck when cancel clicked in change password dialog
Due to transparent UnlockVaultActivity wasn't finished
This commit is contained in:
parent
a6a3b7b2c6
commit
9e92bc6a16
@ -402,6 +402,10 @@ class UnlockVaultPresenter @Inject constructor(
|
|||||||
finishWithResult(null)
|
finishWithResult(null)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun onChangePasswordCanceled() {
|
||||||
|
finishWithResult(null)
|
||||||
|
}
|
||||||
|
|
||||||
private open class PendingUnlock(private val vault: Vault?) : Serializable {
|
private open class PendingUnlock(private val vault: Vault?) : Serializable {
|
||||||
|
|
||||||
private var unlockToken: UnlockToken? = null
|
private var unlockToken: UnlockToken? = null
|
||||||
|
@ -110,6 +110,10 @@ class UnlockVaultActivity : BaseActivity(), //
|
|||||||
presenter.onChangePasswordClick(vaultModel, unverifiedVaultConfig, oldPassword, newPassword)
|
presenter.onChangePasswordClick(vaultModel, unverifiedVaultConfig, oldPassword, newPassword)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onChangePasswordCanceled() {
|
||||||
|
presenter.onChangePasswordCanceled()
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDeleteMissingVaultClicked(vault: Vault) {
|
override fun onDeleteMissingVaultClicked(vault: Vault) {
|
||||||
presenter.onDeleteMissingVaultClicked(vault)
|
presenter.onDeleteMissingVaultClicked(vault)
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ class ChangePasswordDialog : BaseProgressErrorDialog<ChangePasswordDialog.Callba
|
|||||||
interface Callback {
|
interface Callback {
|
||||||
|
|
||||||
fun onChangePasswordClick(vaultModel: VaultModel, unverifiedVaultConfig: UnverifiedVaultConfig?, oldPassword: String, newPassword: String)
|
fun onChangePasswordClick(vaultModel: VaultModel, unverifiedVaultConfig: UnverifiedVaultConfig?, oldPassword: String, newPassword: String)
|
||||||
|
fun onChangePasswordCanceled()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStart() {
|
override fun onStart() {
|
||||||
@ -94,7 +95,7 @@ class ChangePasswordDialog : BaseProgressErrorDialog<ChangePasswordDialog.Callba
|
|||||||
return builder //
|
return builder //
|
||||||
.setTitle(vaultModel.name) //
|
.setTitle(vaultModel.name) //
|
||||||
.setPositiveButton(getString(R.string.dialog_change_password)) { _: DialogInterface, _: Int -> } //
|
.setPositiveButton(getString(R.string.dialog_change_password)) { _: DialogInterface, _: Int -> } //
|
||||||
.setNegativeButton(getString(R.string.dialog_button_cancel)) { _: DialogInterface?, _: Int -> } //
|
.setNegativeButton(getString(R.string.dialog_button_cancel)) { _: DialogInterface?, _: Int -> callback?.onChangePasswordCanceled() } //
|
||||||
.create()
|
.create()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user