Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AnkiDroid/src/main/java/com/ichi2/anki/CoroutineHelpers.kt
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ suspend fun <T> withProgressDialog(
setCancelable(onCancel != null)
if (manualCancelButton != null) {
setCancelable(false)
setCanceledOnTouchOutside(false)
setButton(DialogInterface.BUTTON_NEGATIVE, context.getString(manualCancelButton)) { _, _ ->
Timber.i("Progress dialog cancelled via cancel button")
onCancel?.let { it() }
Expand Down
2 changes: 2 additions & 0 deletions AnkiDroid/src/main/java/com/ichi2/anki/Sync.kt
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ private suspend fun handleDownload(
deckPicker.withProgress(
extractProgress = fullDownloadProgress(TR.syncDownloadingFromAnkiweb()),
onCancel = ::cancelSync,
manualCancelButton = R.string.dialog_cancel,
) {
withCol {
try {
Expand Down Expand Up @@ -264,6 +265,7 @@ private suspend fun handleUpload(
deckPicker.withProgress(
extractProgress = fullDownloadProgress(TR.syncUploadingToAnkiweb()),
onCancel = ::cancelSync,
manualCancelButton = R.string.dialog_cancel,
) {
withCol {
close(downgrade = false, forFullSync = true)
Expand Down
Loading