damontecres / StashAppAndroidTV

Android TV App for Stash
GNU Affero General Public License v3.0
76 stars 4 forks source link

Fixes main page reloading on every resume #354

Closed damontecres closed 1 month ago

damontecres commented 1 month ago

351 introduced a bug where when resuming the main page, it would reload all of the data/rows. This occurred because the "hash" is always recomputed and set, but by default setting a value (event the same value) triggers a notification to observers.

This PR ensures the observers of the hash are only notified when it changes.

I decided to use Java instead of Kotlin for EqualityMutableLiveData since MutableLiveData is written in Java and the override semantics are more simple in Java.