https://kotlinlang.org logo
Title
t

therealbluepandabear

05/13/2022, 8:19 AM
how can i use
.await()
in this context
:thread-please: 1
s

Stylianos Gakis

05/13/2022, 10:11 AM
You can make another version of your query in your dao which returns the type itself but is a suspending function. Otherwise you could keep the one that returns a flow and do
first()
on it, which should function the same way. Run something like this
AppData.pixelArtDB.pixelArtCreationsDao().getAllPixelArtCreations().first()
while you’re inside a suspending context
Just read this luckily. Don’t do the second option I suggested, do the first one. TIL