@@ -66,7 +66,6 @@ import com.duckduckgo.app.browser.autocomplete.BrowserAutoCompleteSuggestionsAda
6666import com.duckduckgo.app.browser.downloader.DownloadFailReason
6767import com.duckduckgo.app.browser.downloader.FileDownloadNotificationManager
6868import com.duckduckgo.app.browser.downloader.FileDownloader
69- import com.duckduckgo.app.browser.downloader.FileDownloader.FileDownloadListener
7069import com.duckduckgo.app.browser.downloader.FileDownloader.PendingFileDownload
7170import com.duckduckgo.app.browser.filechooser.FileChooserIntentBuilder
7271import com.duckduckgo.app.browser.logindetection.DOMLoginDetector
@@ -1131,18 +1130,16 @@ class BrowserTabFragment : Fragment(), FindListener, CoroutineScope, DaxDialogLi
11311130 }
11321131
11331132 private fun requestDownloadConfirmation (pendingDownload : PendingFileDownload ) {
1133+ if (isStateSaved) return
1134+
11341135 val downloadConfirmationFragment = DownloadConfirmationFragment .instance(pendingDownload)
11351136 childFragmentManager.findFragmentByTag(DOWNLOAD_CONFIRMATION_TAG )?.let {
11361137 Timber .i(" Found existing dialog; removing it now" )
1137- childFragmentManager.commitNow { remove(it) }
1138+ childFragmentManager.commitNow(allowStateLoss = true ) { remove(it) }
11381139 }
11391140 downloadConfirmationFragment.show(childFragmentManager, DOWNLOAD_CONFIRMATION_TAG )
11401141 }
11411142
1142- private fun completeDownload (pendingDownload : PendingFileDownload , callback : FileDownloadListener ) {
1143- viewModel.download(pendingDownload)
1144- }
1145-
11461143 private fun launchFilePicker (command : Command .ShowFileChooser ) {
11471144 pendingUploadTask = command.filePathCallback
11481145 val canChooseMultipleFiles = command.fileChooserParams.mode == WebChromeClient .FileChooserParams .MODE_OPEN_MULTIPLE
0 commit comments