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 Bluetooth ViewModel and HomeScreen logic #101

Open
1 task done
Basler182 opened this issue Sep 16, 2024 · 0 comments
Open
1 task done

Refactor Bluetooth ViewModel and HomeScreen logic #101

Basler182 opened this issue Sep 16, 2024 · 0 comments
Labels
ENGAGE HF ENGAGE-HF-specific issues enhancement New feature or request

Comments

@Basler182
Copy link
Contributor

Problem

The BluetoothViewModel currently handles a lot more than it should and is tightly coupled with the Home Screen logic.

Solution

  • Create a new component named MessageHandler and extract the message logic currently residing in BluetoothViewModel into this component.
  • Inject the MessageHandler into MainActivityViewModel and invoke a new action that will internally call the handler.
  • Rename BluetoothViewModel to HomeScreenViewModel to better reflect its purpose.
  • Extract Bluetooth-related logic into its own service to promote separation of concerns and improve maintainability.

Additional context

This refactor will simplify the ViewModel, improve the separation of concerns, and make the application easier to test and extend in the future.

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines
@Basler182 Basler182 added enhancement New feature or request ENGAGE HF ENGAGE-HF-specific issues labels Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ENGAGE HF ENGAGE-HF-specific issues enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant