Nacho Ruiz Martin
10/21/2023, 9:16 PM1.1.0
.
I’m using FlowSettings
with DatastoreSettings
implementation. The thing is that when I listen for changes in a property with:
settings.getStringOrNullFlow(key)
writing with:
settings.putString(key, value) //This is a suspend fun
is blocked forever, it never ends.
Am I the only one experiencing this? I did downgrade the lib to 1.0.0
and no change.russhwolf
10/21/2023, 10:20 PMNacho Ruiz Martin
10/21/2023, 10:26 PMFlowSettings
into a class instantiated as a factory (new instance each time is needed). This class contains a couple of methods, one of them to get the flow and the other one to put some value. At least two listeners are getting updates from the same flow and the lock happens when trying to write a value there.
I just tried with ObservableSettings
and it’s working as expected.russhwolf
10/21/2023, 10:32 PMNacho Ruiz Martin
10/21/2023, 10:35 PMFlowSettings
is injected as a singleton.russhwolf
10/21/2023, 10:35 PM