Hi all, I was wondering about something: If I use UseCases to do things in my app, and I have lets say a screen and I can load an item, lets say a user account, into the screen using the id of the user. I would like to observe the user by its id from the current value in the repository, and of course any changes in the user will be propagated in my flow.
So I have a ObserveUserUseCase to handle this for me.
My question: If lets say this user is not existing yet in my repository and I need to fetch it from the backend, would you put that logic into the
a) The ObserveUserUseCase (if the repository returns null/not existing it fetches the user)
b) In the repository, observing on the user might trigger a backend call in this case automatically
c) Make the ObserveUserUseCase return something to show its not existing in the repository (like NullPointer) to my ViewModel and call a separate FetchUserUseCase to load the user