commit | a7376659782cd1b622ae259de8a4b070a3ec0f21 | [log] [tgz] |
---|---|---|
author | Luca Stefani <luca.stefani.ge1@gmail.com> | Fri Sep 08 10:40:41 2023 +0200 |
committer | Luca Stefani <luca.stefani.ge1@gmail.com> | Fri Sep 08 11:34:15 2023 +0200 |
tree | 634389c682c4c103595819ad63f5663e3885d622 | |
parent | 70e83a696b711fb507703612ac93ca2630bdbf95 [diff] |
Glimpse: Use StateFlow instead of SharedFlow StateFlows are `distinctUntilChanged` by default, that means we avoid possibly passing around new data with no changes. The downside is that StateFlow requires a "default" value so we must implement a wrapper class around the actual values from the query or an empty/default value so that the different states can be handled properly in app. Change-Id: Ib6033c36297be5c27e70ace3f1478ea0c22b2c5e