Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Architecture improvements... #128

Open
1 of 8 tasks
fennifith opened this issue May 15, 2020 · 0 comments
Open
1 of 8 tasks

Architecture improvements... #128

fennifith opened this issue May 15, 2020 · 0 comments

Comments

@fennifith
Copy link
Owner

fennifith commented May 15, 2020

I first started writing this app... a while ago. There are some pretty nasty things lurking in its codebase, and to be honest I didn't put a lot of thought into its structure when I was building it. I'm creating this issue as a general todo-list of anything that should be moved, refactored, and reorganized in the future. The plan is to use libraries from Android Jetpack, such as Room and LiveData, as well as a general DI framework like Koin.

  • Move sound/radio player from Application class to injected component
  • Move sunset time calculator from Application class to injected component
  • Create common "AlertData" model that alarms & timers inherit from
  • Make an injected "AlertPlayer" component containing the repeat/vibrate logic from AlarmActivity
  • *Remove AlarmManager interaction from data models, move scheduling to injected component
  • *Switch alarm "database" (SharedPreferences, referenced from data models) to Room/SQL
  • *Implement LiveData / ViewModel classes for UI interaction
  • Write tests for some functionality (repeat behavior, etc)

* These are pretty heavy tasks and may need to be done all at once, or maintained in a separate branch until complete.

I did start working on some of these in the refactor branch a while ago - but it's a little out of date now, and I'm realizing it'd be better to introduce some of these changes separately. Open to feedback on any of the decisions here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant