Has anyone here used the new Jetpack DataStore yet? I want to restore the checked state of a checkbox options menu item when a fragment is created.
1. I use
first()
because I only need to set the value from DataStore once, afterwards just clicking the checkbox will check/uncheck it. Does this make sense? Are there any situations where it will break?
2. Is the asynchronicity a problem? As far as I understand, you can't read from DataSore synchronously so this is the only option I can see.