[v2.13.2][Fix]解决Room崩溃问题
This commit is contained in:
@@ -12,6 +12,7 @@ import com.mogo.eagle.core.utilcode.kotlin.lifeCycleScope
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
@@ -156,6 +157,7 @@ object DataManager {
|
||||
}
|
||||
|
||||
private suspend fun getCacheMessages(context: Context): List<MsgBoxBean> = withContext(Dispatchers.IO) {
|
||||
delay(2000)
|
||||
return@withContext MsgBoxDb.getDb(context)
|
||||
.monitorDao()
|
||||
.getAllCachedMessages()
|
||||
|
||||
Reference in New Issue
Block a user