File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
AnkiDroid/src/main/java/com/ichi2/anki Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -438,7 +438,9 @@ suspend fun <T> withProgressDialog(
438438 }
439439 }
440440 // disable taps immediately
441- context.window.setFlags(WindowManager .LayoutParams .FLAG_NOT_TOUCHABLE , WindowManager .LayoutParams .FLAG_NOT_TOUCHABLE )
441+ context.runOnUiThread {
442+ context.window.setFlags(WindowManager .LayoutParams .FLAG_NOT_TOUCHABLE , WindowManager .LayoutParams .FLAG_NOT_TOUCHABLE )
443+ }
442444 // reveal the dialog after 600ms
443445 var dialogIsOurs = false
444446 val dialogJob =
@@ -470,7 +472,7 @@ suspend fun <T> withProgressDialog(
470472 } finally {
471473 dialogJob.cancel()
472474 dismissDialogIfShowing(dialog)
473- context.window.clearFlags(WindowManager .LayoutParams .FLAG_NOT_TOUCHABLE )
475+ context.runOnUiThread { context. window.clearFlags(WindowManager .LayoutParams .FLAG_NOT_TOUCHABLE ) }
474476 if (dialogIsOurs) {
475477 AnkiDroidApp .instance.progressDialogShown = false
476478 }
You can’t perform that action at this time.
0 commit comments