-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: refactor checker inbox & task to jetpack compose with multi module #2086
Conversation
...om/sparklead/feature/checker_inbox_task/checker_inbox_and_task/di/CheckerInboxTasksModule.kt
Outdated
Show resolved
Hide resolved
...ad/feature/checker_inbox_task/checker_inbox_and_task/presentation/CheckerInboxTasksScreen.kt
Outdated
Show resolved
Hide resolved
...ad/feature/checker_inbox_task/checker_inbox_and_task/presentation/CheckerInboxTasksScreen.kt
Outdated
Show resolved
Hide resolved
option = "Client Approval", | ||
badge = "0" | ||
) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why onclick is missing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Till now there is no next screen for that feature.
fun CheckerInboxTasksScreen(onBackPressed: () -> Unit, checkerInbox: () -> Unit) { | ||
|
||
val checkerInboxTasksViewModel: CheckerInboxTasksViewModel = hiltViewModel() | ||
val state = checkerInboxTasksViewModel.checkerInboxTasksUiState.collectAsState().value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use collectAsState().value instead use collectAsStateWithLifecycle()
every where
|
||
val checkerInboxTasksViewModel: CheckerInboxTasksViewModel = hiltViewModel() | ||
val state = checkerInboxTasksViewModel.checkerInboxTasksUiState.collectAsState().value | ||
val isRefreshing by checkerInboxTasksViewModel.isRefreshing.collectAsState() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use collectAsState() instead use collectAsStateWithLifecycle() every where
this, factory | ||
).get(CheckerInboxTasksViewModel::class.java) | ||
|
||
viewModel.getCheckerTasks().observe(viewLifecycleOwner, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this initial load of getCheckerTasks() and getRescheduleLoanTasks() in composable screen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created one GetCheckerInboxBadgesUseCase which consist both.
Fixes #2082
XML Screen
Record_2024-04-16-22-22-28.mp4
Jetpack Compose
Record_2024-04-17-19-34-50.mp4