0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 12:02:16 +02:00

Fix crash after changing theme

Closes #11981
This commit is contained in:
Damien Elmes 2022-08-07 22:42:58 +10:00 committed by Mike Hardy
parent deb3a539ec
commit 065b0d0ea2

View File

@ -42,6 +42,8 @@ fun AnkiActivity.launchCatchingTask(
return lifecycle.coroutineScope.launch {
try {
block()
} catch (exc: CancellationException) {
// do nothing
} catch (exc: BackendInterruptedException) {
Timber.e("caught: %s", exc)
showSimpleSnackbar(this@launchCatchingTask, exc.localizedMessage, false)