Skip to content

Commit

Permalink
Fixed minor bug for Authentication failed on Scoped issuance when no …
Browse files Browse the repository at this point in the history
…action is taken via the browser
  • Loading branch information
stzouvaras committed Oct 12, 2024
1 parent 59c18ae commit 8e873f1
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import eu.europa.ec.uilogic.navigation.helper.generateComposableArguments
import eu.europa.ec.uilogic.navigation.helper.generateComposableNavigationLink
import eu.europa.ec.uilogic.navigation.helper.hasDeepLink
import eu.europa.ec.uilogic.serializer.UiSerializer
import kotlinx.coroutines.Job
import kotlinx.coroutines.launch
import org.koin.android.annotation.KoinViewModel
import org.koin.core.annotation.InjectedParam
Expand Down Expand Up @@ -104,6 +105,9 @@ class AddDocumentViewModel(
private val uiSerializer: UiSerializer,
@InjectedParam private val flowType: IssuanceFlowUiConfig,
) : MviViewModel<Event, State, Effect>() {

var issuanceJob: Job? = null

override fun setInitialState(): State = State(
navigatableAction = getNavigatableAction(flowType),
onBackAction = getOnBackAction(flowType),
Expand Down Expand Up @@ -231,7 +235,8 @@ class AddDocumentViewModel(
docType: DocType,
context: Context
) {
viewModelScope.launch {
issuanceJob?.cancel()
issuanceJob = viewModelScope.launch {

setState {
copy(
Expand Down

0 comments on commit 8e873f1

Please sign in to comment.