Skip to content
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

Merged
merged 4 commits into from
Apr 20, 2024

Conversation

Aditya-gupta99
Copy link
Collaborator

@Aditya-gupta99 Aditya-gupta99 commented Mar 21, 2024

Fixes #2082


XML Screen
Record_2024-04-16-22-22-28.mp4

Jetpack Compose
Record_2024-04-17-19-34-50.mp4

option = "Client Approval",
badge = "0"
) {

Copy link
Member

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?

Copy link
Collaborator Author

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
Copy link
Member

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()
Copy link
Member

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,
Copy link
Member

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

Copy link
Collaborator Author

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.

@therajanmaurya therajanmaurya merged commit 9268400 into openMF:master Apr 20, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor: migrate Checker Inbox & Tasks screen to jetpack compose with multi module
2 participants