Laixer / Swabbr-Android

Swabbr Android application
2 stars 0 forks source link

Clean up when fragments get their data #158

Closed tabeckers closed 3 years ago

tabeckers commented 3 years ago

Most of the fragments currently get their data each time their are being re-entered. When our view model already has the data required, don't load it. This functionality should be implemented in the view models, as this is not the responsibility of fragments.

We should also make the moment and method of triggering view model data calls from fragments consistent. We probably want to implement this in the onCreated method of each fragment, while also taking race conditions into account. Look into this.