Merge pull request #5195 from abaker/fix_crash_detection

Set PREFS_CRASH_KEY synchronously
This commit is contained in:
ganfra 2022-02-10 19:21:17 +01:00 committed by GitHub
commit 56338c22dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/5195.bugfix Normal file
View File

@ -0,0 +1 @@
Reliably display crash report prompt

View File

@ -63,7 +63,7 @@ class VectorUncaughtExceptionHandler @Inject constructor(
*/
override fun uncaughtException(thread: Thread, throwable: Throwable) {
Timber.v("Uncaught exception: $throwable")
preferences.edit {
preferences.edit(commit = true) {
putBoolean(PREFS_CRASH_KEY, true)
}
val b = StringBuilder()