Add support for restoring downloads

pull/35/head
Arturo Mejia 4 years ago
parent 487eeb6b88
commit c63fd3f9ac

@ -135,6 +135,8 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
}
initializeWebExtensionSupport()
restoreDownloads()
// Just to make sure it is impossible for any application-services pieces
// to invoke parts of itself that require complete megazord initialization
// before that process completes, we wait here, if necessary.
@ -161,6 +163,12 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
components.appStartupTelemetry.onFenixApplicationOnCreate()
}
private fun restoreDownloads() {
if (FeatureFlags.viewDownloads) {
components.useCases.downloadUseCases.restoreDownloads()
}
}
private fun initVisualCompletenessQueueAndQueueTasks() {
val queue = components.performance.visualCompletenessQueue.queue

@ -734,7 +734,7 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
return
}
val onTryAgain: (Long) -> Unit = {
val onTryAgain: (String) -> Unit = {
savedDownloadState.first?.let { dlState ->
store.dispatch(
ContentAction.UpdateDownloadAction(

@ -27,7 +27,7 @@ class DynamicDownloadDialog(
private val container: ViewGroup,
private val downloadState: DownloadState?,
private val didFail: Boolean,
private val tryAgain: (Long) -> Unit,
private val tryAgain: (String) -> Unit,
private val onCannotOpenFile: () -> Unit,
private val view: View,
private val toolbarHeight: Int,

@ -3,5 +3,5 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
object AndroidComponents {
const val VERSION = "57.0.20200827190112"
const val VERSION = "57.0.20200829130559"
}

Loading…
Cancel
Save