Merge pull request #776 from naveensingh/fix_threading_crash

Execute `clearAllMessagesIfNeeded` callback on the main thread
This commit is contained in:
Tibor Kaputa 2023-10-05 12:07:04 +02:00 committed by GitHub
commit 96749ac330
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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()