Closed oscarnylander closed 9 months ago
@dessalines Since there's some significant work involved in refactoring the app to use Hilt, let me know if you're interested in getting this in. If you do, I can probably get it done, but I'd like to avoid the effort if not.
Yeah don't start work on this yet... I'm not a huge fan of these annotation-based, dependency injection frameworks, unless room absolutely can't work without it. I've always found them to be less code-traceable, and essentially hacks to make the code look just a little nicer.
It would only be useful for the HTTP and DB singletons, and since most of that work is done already, doesn't seem worth the effort.
Alright.
I think one of the more interesting things that Hilt could provide would be Navigation Destination-scoped ViewModels, which (without looking too closely) would probably solve #402.
That one hopefully should be solved in the autogen_types
branch. I use a better HTTP result sealed class(with empty, loading, success, and failed results), which should handle loading better.
Stale issue.
Dependency Injection can:
I recommend
hilt
, as it builds on Dagger but reduces the undesirable amount of complexity present in setting up Dagger yourself.