Colton Idle
01/30/2023, 12:22 AMyschimke
01/30/2023, 1:18 AMStylianos Gakis
01/30/2023, 8:29 AMDatastore<Preferences>
as a String right? Could even do it with the proto Datastore I guess?yschimke
01/30/2023, 8:48 AMyschimke
01/30/2023, 8:49 AMyschimke
01/30/2023, 8:49 AM* DataStore provides a safe and durable way to store small amounts of data, such as preferences
* and application state. It does not support partial updates: if any field is modified, the whole
* object will be serialized and persisted to disk. If you want partial updates, consider the Room
* API (SQLite).
*
* DataStore provides ACID guarantees. It is thread-safe, and non-blocking. In particular, it
* addresses these design shortcomings of the SharedPreferences API:
*
* 1. Synchronous API encourages StrictMode violations
* 2. apply() and commit() have no mechanism of signalling errors
* 3. apply() will block the UI thread on fsync()
* 4. Not durable – it can returns state that is not yet persisted
* 5. No consistency or transactional semantics
* 6. Throws runtime exception on parsing errors
* 7. Exposes mutable references to its internal state