Same unique repository class for Room and Datastore, or two distinct repositories

21 Views Asked by At

I'm trying to include a Datastore with Datastore preferences into a project with Android and Room. I'm trying to follow the clean architecture guide that defines a Repository class as a mediator between the data layer and the UI layer, like this:

Repository pattern

Then, my repository class now only contains references to the Room database.

When adding my DataStore preferences, i should reference it into this unique repository class, o it must be referenced into a new repository class?

0

There are 0 best solutions below