-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Add async settings loading and Jetpack datastore support #44
Conversation
# Conflicts: # gradle/libs.versions.toml # settings.gradle
} | ||
} | ||
|
||
inline fun<T> dataStoreSnapshotKey(name: String, resolver: DataStoreSnapshotKeySelector.() -> DataStoreSnapshotKeySelector.Result<T>): DataStoreSnapshot.Key<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't decided which version of key creation is better to use (one with dataStore*type*settingsSnapshotKey
or dataStoreSnapshotKey
builder). @alorma What do you think?
Hi @pelmenstar1 Beside I love the Idea of the async preference, I'm not sure on merging it also with the data store implementation. So, I've decided to check it and got an approach to use datastore in a synchronous way, I've made the work here: Could you check it and give me your thought? That's just a first implementation, later on it could came up with your async solution. But I think it's a good approach for a first datastore impl. |
@alorma Ok, no problem. BTW, I don't think the use of Jetpack DataStore in a synchronous context is a good idea, because:
|
I'm closing the PR as the implementation of Jetpack DataStore support, which better fits in the current state of the library, has been merged. |
Loading
,Error
, andSuccess
).To add: