We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is there any plans for integration with Androidx DataStore? Or does Androidx provide this somewhere?
There are some nuances with https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:datastore/datastore-core-okio/src/commonMain/kotlin/androidx/datastore/core/okio/OkioSerializer.kt?q=OkioSerializer
That would be good to handle once. Something like
fun <T: Message<T, Nothing>> ProtoAdapter<T>.toOkioSerializer(): OkioSerializer<T> { return object : OkioSerializer<T> { override val defaultValue: T = this@toOkioSerializer.decode(ByteString.EMPTY) override suspend fun readFrom(source: BufferedSource): T { try { return this@toOkioSerializer.decode(source) } catch (exception: IOException) { throw CorruptionException("Cannot read UserFavouriteGames proto.", exception) } } override suspend fun writeTo(t: T, sink: BufferedSink) { sink.write(t.encode()) } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there any plans for integration with Androidx DataStore? Or does Androidx provide this somewhere?
There are some nuances with https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:datastore/datastore-core-okio/src/commonMain/kotlin/androidx/datastore/core/okio/OkioSerializer.kt?q=OkioSerializer
That would be good to handle once. Something like
The text was updated successfully, but these errors were encountered: