Execute `clearAllMessagesIfNeeded` callback on the main thread
This commit is contained in:
parent
fe0553650e
commit
30ba6dce5b
|
@ -1038,7 +1038,7 @@ fun Context.clearAllMessagesIfNeeded(callback: () -> Unit) {
|
||||||
ensureBackgroundThread {
|
ensureBackgroundThread {
|
||||||
messagesDB.deleteAll()
|
messagesDB.deleteAll()
|
||||||
config.wasDbCleared = true
|
config.wasDbCleared = true
|
||||||
callback()
|
Handler(Looper.getMainLooper()).post(callback)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
callback()
|
callback()
|
||||||
|
|
Loading…
Reference in New Issue