Execute `clearAllMessagesIfNeeded` callback on the main thread

This commit is contained in:
Naveen 2023-10-05 14:37:19 +05:30
parent fe0553650e
commit 30ba6dce5b
No known key found for this signature in database
GPG Key ID: 0E155DAD31671DA3
1 changed files with 1 additions and 1 deletions

View File

@ -1038,7 +1038,7 @@ fun Context.clearAllMessagesIfNeeded(callback: () -> Unit) {
ensureBackgroundThread {
messagesDB.deleteAll()
config.wasDbCleared = true
callback()
Handler(Looper.getMainLooper()).post(callback)
}
} else {
callback()