scroll lag fix in ap loan details (#8620)

Co-authored-by: sangaraboinarishvik <rishvik.vardhan@navi.com>
This commit is contained in:
Maila Rajanikanth
2023-11-08 16:22:33 +05:30
committed by GitHub
parent f826576387
commit 2705bfc014
2 changed files with 13 additions and 11 deletions

View File

@@ -58,18 +58,20 @@ fun InitScreenComponent(
}
LaunchedEffect(Unit) { activity.setApScreenVM(viewModel) }
BackHandler {
if (
bottomSheetVisibilityState.value == true &&
if(activity.loaderState.value.not()){
if (
bottomSheetVisibilityState.value == true &&
bottomSheetContentState.value.isCancellable.orFalse()
) {
bottomSheetVisibilityState.value = false
navigateToHomeOnEmptyScreen(viewModel, activity)
} else if (bottomSheetVisibilityState.value != true) {
viewModel.let { vm ->
vm.getSystemBackActionData()?.actions?.let {
vm.handleActions(vm.getSystemBackActionData())
) {
bottomSheetVisibilityState.value = false
navigateToHomeOnEmptyScreen(viewModel, activity)
} else if (bottomSheetVisibilityState.value != true) {
viewModel.let { vm ->
vm.getSystemBackActionData()?.actions?.let {
vm.handleActions(vm.getSystemBackActionData())
}
?: run { navigateToHomeOnEmptyScreen(viewModel, activity) }
}
?: run { navigateToHomeOnEmptyScreen(viewModel, activity) }
}
}
}

View File

@@ -52,7 +52,7 @@ fun StickyHeaderAndFooterRenderer(
mutableStateOf(RecyclerView(context).apply {
isNestedScrollingEnabled = false
setHasFixedSize(true)
setRecycledViewPool(null)
recycledViewPool.setMaxRecycledViews(0, 0)
layoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
})
}