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: Migrate from Livedata to Stateflow #2415

Closed
18 tasks done
PratyushSingh07 opened this issue Oct 21, 2023 · 1 comment · Fixed by #2416, #2419, #2421, #2423 or #2424
Closed
18 tasks done

Refactor: Migrate from Livedata to Stateflow #2415

PratyushSingh07 opened this issue Oct 21, 2023 · 1 comment · Fixed by #2416, #2419, #2421, #2423 or #2424
Assignees

Comments

@PratyushSingh07
Copy link
Collaborator

PratyushSingh07 commented Oct 21, 2023

Summary:

StateFlow offers several advantages over LiveData. First, StateFlow promotes immutability, ensuring that its data remains unchanged once set, which enhances code reliability. Unlike LiveData, StateFlow seamlessly integrates with Kotlin's coroutines, providing powerful asynchronous programming capabilities. StateFlow handles backpressure efficiently, preventing issues related to data overflow. Additionally, StateFlow benefits from Kotlin's Flow API, offering a wide array of transformation operators for data manipulation. Lastly, StateFlow is highly testable, enabling developers to write unit tests effectively. These advantages make StateFlow a robust choice for managing and observing data streams in Android applications, especially in Kotlin-based projects.

Viewmodels that needs to be converted in this issue will be :

  • LoginViewmodel
  • RegistrationViewmodel
  • UpdatePasswordViewmodel
  • SavingAccountsDetailViewModel
  • SavingAccountsTransactionViewModel
  • SavingsAccountApplicationViewModel
  • SavingsAccountWithdrawViewModel
  • SavingsMakeTransferViewModel
  • ThirdPartyTransferViewModel
  • TransferProcessViewModel
  • RecentTransactionViewModel
  • QrCodeImportViewModel
  • NotificationViewModel
  • HelpViewModel
  • ClientChargeViewModel
  • BeneficiaryListViewModel
  • BeneficiaryDetailViewModel
  • BeneficiaryApplicationViewModel

It is really important that during this refactoring we dont loose our test coverage. Since the unit tests were written for livedata , the test classes will now have to be changed to support stateflows

@PratyushSingh07
Copy link
Collaborator Author

I have taken this up

PratyushSingh07 added a commit to PratyushSingh07/mifos-mobile that referenced this issue Oct 21, 2023
PratyushSingh07 added a commit to PratyushSingh07/mifos-mobile that referenced this issue Oct 22, 2023
PratyushSingh07 added a commit to PratyushSingh07/mifos-mobile that referenced this issue Oct 22, 2023
PratyushSingh07 added a commit to PratyushSingh07/mifos-mobile that referenced this issue Oct 23, 2023
PratyushSingh07 added a commit to PratyushSingh07/mifos-mobile that referenced this issue Oct 23, 2023
PratyushSingh07 added a commit to PratyushSingh07/mifos-mobile that referenced this issue Oct 23, 2023
PratyushSingh07 added a commit to PratyushSingh07/mifos-mobile that referenced this issue Nov 3, 2023
PratyushSingh07 added a commit to PratyushSingh07/mifos-mobile that referenced this issue Nov 4, 2023
SekhGulamMainuddin pushed a commit to SekhGulamMainuddin/mifos-mobile that referenced this issue Feb 14, 2024
SekhGulamMainuddin pushed a commit to SekhGulamMainuddin/mifos-mobile that referenced this issue Feb 14, 2024
SekhGulamMainuddin pushed a commit to SekhGulamMainuddin/mifos-mobile that referenced this issue Feb 14, 2024
SekhGulamMainuddin pushed a commit to SekhGulamMainuddin/mifos-mobile that referenced this issue Feb 14, 2024
SekhGulamMainuddin pushed a commit to SekhGulamMainuddin/mifos-mobile that referenced this issue Feb 14, 2024
SekhGulamMainuddin pushed a commit to SekhGulamMainuddin/mifos-mobile that referenced this issue Feb 14, 2024
SekhGulamMainuddin pushed a commit to SekhGulamMainuddin/mifos-mobile that referenced this issue Feb 14, 2024
SekhGulamMainuddin pushed a commit to SekhGulamMainuddin/mifos-mobile that referenced this issue Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment