Skip to content

Commit

Permalink
- Navigate back on Loading screen when phone signer fails
Browse files Browse the repository at this point in the history
- Hide keyboard when the scanner reads a qr
- Add 1 sec delay before calling checkHasAdmin
  • Loading branch information
ariel10aguero committed Sep 25, 2023
1 parent 186db84 commit 04ff760
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
import org.eclipse.paho.client.mqttv3.*
Expand Down Expand Up @@ -702,6 +703,7 @@ class SignerManagerImpl(
when (loadResponse) {
is LoadResponse.Loading -> {}
is Response.Error -> {
delay(1000L)
checkHasAdmin(checkAdminCallback)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ internal class OnBoardConnectFragment: SideEffectFragment<

override suspend fun onSideEffectCollect(sideEffect: OnBoardConnectSideEffect) {
if (sideEffect is OnBoardConnectSideEffect.FromScanner) {
binding.editTextCodeInput.setText(sideEffect.value.value)
val editTextCodeInput = binding.editTextCodeInput
editTextCodeInput.setText(sideEffect.value.value)
hideKeyboardFrom(editTextCodeInput.context, editTextCodeInput)
} else {
sideEffect.execute(binding.root.context)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ internal class OnBoardConnectViewModel @Inject constructor(
app.getString(R.string.phone_signer_error)
)
)
mnemonicDialogViewStateContainer.updateViewState(MnemonicDialogViewState.Idle)
}
}

Expand Down

0 comments on commit 04ff760

Please sign in to comment.