GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit c63fd3f9 authored by Arturo Mejia's avatar Arturo Mejia
Browse files

Add support for restoring downloads

parent 487eeb6b
......@@ -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"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment