[2.13.2][fix]解决数据库崩溃的问题

This commit is contained in:
chenfufeng
2023-01-11 15:44:34 +08:00
parent df66532641
commit 8fdb69c65f
2 changed files with 33 additions and 17 deletions

View File

@@ -8,6 +8,7 @@ import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.msgbox.db.MsgBoxDb
import com.mogo.eagle.core.function.msgbox.db.MsgBoxInfo
import com.mogo.eagle.core.utilcode.kotlin.lifeCycleScope
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.eagle.core.utilcode.util.Utils
import kotlinx.coroutines.Dispatchers
@@ -139,7 +140,11 @@ object DataManager {
fun queryAllMessages(context: Context) {
scope.launch {
initCache()
getCacheMessages(context)
try {
getCacheMessages(context)
} catch (e: Exception) {
CallerLogger.e("DataManager", e.message)
}
}
}