BIT-1663: Display toast when auth request is declined or approved (#968)

This commit is contained in:
David Perez
2024-02-06 12:50:35 -06:00
committed by Álison Fernandes
parent 8cb167d522
commit b8e2f7856a
2 changed files with 20 additions and 3 deletions

View File

@@ -99,7 +99,7 @@ class LoginApprovalViewModel @Inject constructor(
private fun handleApproveRequestClicked() {
viewModelScope.launch {
trySendAction(
LoginApprovalAction.Internal.DeclineRequestResultReceive(
LoginApprovalAction.Internal.ApproveRequestResultReceive(
result = authRepository.updateAuthRequest(
requestId = mutableStateFlow.value.requestId,
masterPasswordHash = mutableStateFlow.value.masterPasswordHash,
@@ -195,6 +195,7 @@ class LoginApprovalViewModel @Inject constructor(
) {
when (action.result) {
is AuthRequestResult.Success -> {
sendEvent(LoginApprovalEvent.ShowToast(R.string.log_in_denied.asText()))
sendEvent(LoginApprovalEvent.NavigateBack)
}