cashapp / sqldelight

SQLDelight - Generates typesafe Kotlin APIs from SQL
https://cashapp.github.io/sqldelight/
Apache License 2.0
6.01k stars 501 forks source link

Changes in the database are not observed when using a context other than Dispatchers.Main #5306

Open PavelMesicek opened 1 week ago

PavelMesicek commented 1 week ago

SQLDelight Version

2.0.2

Application Operating System

Android

Describe the Bug

The function observes changes only using the Dispatchers.Main

fun getActionFlow(id: Long): Flow<Action> { val actionFlow = database.actionEntityQueries.selectActionById(id).asFlow().mapToOne(Dispatchers.Main)

Similar issue on StackOverFlow