Merge pull request #776 from naveensingh/fix_threading_crash
Execute `clearAllMessagesIfNeeded` callback on the main thread
This commit is contained in:
commit
96749ac330
|
@ -1038,7 +1038,7 @@ fun Context.clearAllMessagesIfNeeded(callback: () -> Unit) {
|
|||
ensureBackgroundThread {
|
||||
messagesDB.deleteAll()
|
||||
config.wasDbCleared = true
|
||||
callback()
|
||||
Handler(Looper.getMainLooper()).post(callback)
|
||||
}
|
||||
} else {
|
||||
callback()
|
||||
|
|
Loading…
Reference in New Issue