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

feat : migrating notification fragment to MVVM #2180

Conversation

gururani-abhishek
Copy link
Contributor

@gururani-abhishek gururani-abhishek commented Jun 18, 2023

Fixes MOBILE-70

  1. Created NotificationViewModel that handles business logic.
  2. Created a NotificationRepository interface and it's implementation class to link ViewModel interactions with data layer.
  3. Kept UI related code to View(NotificationFragment) and shifted business logic from both View(NotificationFragment) and Presenter(NotificationPresenter) to ViewModel(NotificationViewModel)
  4. Performed proper unit testing on viewModel and Repository using exiting framework -> jUnit and Mockito.

Please Add Screenshots If there are any UI changes.

screen-20230618-231559.mp4

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Apply the AndroidStyle.xml style template to your code in Android Studio.

  • Run the unit tests with ./gradlew check to make sure you didn't break anything

  • If you have multiple commits please combine them into one commit by squashing them.

@gururani-abhishek gururani-abhishek marked this pull request as draft June 18, 2023 18:08
@gururani-abhishek
Copy link
Contributor Author

gururani-abhishek commented Jun 19, 2023

Hey @jawidMuhammadi, please review this.

@gururani-abhishek gururani-abhishek marked this pull request as ready for review June 19, 2023 10:13
@gururani-abhishek gururani-abhishek marked this pull request as draft June 22, 2023 19:39
…g-notification-fragment-to-mvvm

# Conflicts:
#	app/src/main/java/org/mifos/mobile/ui/fragments/NotificationFragment.kt
1. Fixed Merge Conflicts
2. Fix for build fail
@gururani-abhishek gururani-abhishek changed the base branch from development to mvvm_architecture July 4, 2023 06:55
1. added unit tests for notification viewModel and repository
@gururani-abhishek gururani-abhishek marked this pull request as ready for review July 4, 2023 12:15
…g-notification-fragment-to-mvvm

# Conflicts:
#	app/src/main/java/org/mifos/mobile/injection/module/RepositoryModule.kt
@gururani-abhishek
Copy link
Contributor Author

Hey @jawidMuhammadi, I've resolved the conflicts in this one as well.

@jawidMuhammadi jawidMuhammadi merged commit a6a541d into openMF:mvvm_architecture Jul 18, 2023
3 checks passed
@gururani-abhishek gururani-abhishek deleted the migrating-notification-fragment-to-mvvm branch July 19, 2023 09:53
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.

2 participants