NTP-8487 | Mehul | back navigation keyboard<>cursor fix (#13267)

This commit is contained in:
Mehul Garg
2024-10-22 17:31:38 +05:30
committed by GitHub
parent 685a567978
commit 2a9fdf64c1
2 changed files with 9 additions and 1 deletions

View File

@@ -126,6 +126,9 @@ constructor(
private val _rewardsNudgeDetailEntity = MutableStateFlow<NudgeDetailEntity?>(null)
val rewardsNudgeDetailEntity = _rewardsNudgeDetailEntity.asStateFlow()
private val _isBackFromNavigation = MutableStateFlow(false)
val isBackFromNavigation = _isBackFromNavigation.asStateFlow()
private val _isNudgeLitmusExperimentEnabled = MutableStateFlow(false)
val isNudgeLitmusExperimentEnabled = _isNudgeLitmusExperimentEnabled.asStateFlow()
@@ -493,6 +496,7 @@ constructor(
)
notifyError(billDetailsResponse)
}
_isBackFromNavigation.update { true }
_isBillDetailsLoading.update { false }
}

View File

@@ -152,6 +152,8 @@ fun CustomerDataInputScreen(
customerDataInputViewModel.rewardsNudgeDetailEntity.collectAsStateWithLifecycle()
val isNudgeLitmusExperimentEnabled by
customerDataInputViewModel.isNudgeLitmusExperimentEnabled.collectAsStateWithLifecycle()
val isBackFromNavigation by
customerDataInputViewModel.isBackFromNavigation.collectAsStateWithLifecycle()
LaunchedEffect(Unit) {
naviBbpsAnalytics.onLanded(
@@ -302,7 +304,9 @@ fun CustomerDataInputScreen(
Spacer(modifier = Modifier.weight(1f))
Spacer(modifier = Modifier.height(48.dp))
LaunchedEffect(Unit) { showKeyboard = true }
if (!isBackFromNavigation) {
LaunchedEffect(Unit) { showKeyboard = true }
}
}
is CustomerInputScreenState.Error -> Unit
}