|
|
|
@ -520,6 +520,8 @@ abstract class BaseBrowserFragment :
|
|
|
|
|
requestPermissions(permissions, REQUEST_CODE_DOWNLOAD_PERMISSIONS)
|
|
|
|
|
},
|
|
|
|
|
customFirstPartyDownloadDialog = { filename, contentSize, positiveAction, negativeAction ->
|
|
|
|
|
run {
|
|
|
|
|
if (currentStartDownloadDialog == null) {
|
|
|
|
|
FirstPartyDownloadDialog(
|
|
|
|
|
activity = requireActivity(),
|
|
|
|
|
filename = filename.value,
|
|
|
|
@ -528,11 +530,16 @@ abstract class BaseBrowserFragment :
|
|
|
|
|
negativeButtonAction = negativeAction.value,
|
|
|
|
|
).onDismiss {
|
|
|
|
|
currentStartDownloadDialog = null
|
|
|
|
|
}.show(binding.startDownloadDialogContainer).also {
|
|
|
|
|
}.show(binding.startDownloadDialogContainer)
|
|
|
|
|
.also {
|
|
|
|
|
currentStartDownloadDialog = it
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
customThirdPartyDownloadDialog = { downloaderApps, onAppSelected, negativeActionCallback ->
|
|
|
|
|
run {
|
|
|
|
|
if (currentStartDownloadDialog == null) {
|
|
|
|
|
ThirdPartyDownloadDialog(
|
|
|
|
|
activity = requireActivity(),
|
|
|
|
|
downloaderApps = downloaderApps.value,
|
|
|
|
@ -543,6 +550,8 @@ abstract class BaseBrowserFragment :
|
|
|
|
|
}.show(binding.startDownloadDialogContainer).also {
|
|
|
|
|
currentStartDownloadDialog = it
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|