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 = [email protected](ByteString.EMPTY) override suspend fun readFrom(source: BufferedSource): T { try { return [email protected](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:
The answer is I don't know so probably no. Could this be added to your project and work as is otherwise?
Sorry, something went wrong.
Yeah, it's working fine locally. Just feels like anyone using Wire and DataStore will have to write exactly the same adapter.
Feel free to close.
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: