Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gaba
fenix
Commits
c63fd3f9
Commit
c63fd3f9
authored
Aug 21, 2020
by
Arturo Mejia
Browse files
Add support for restoring downloads
parent
487eeb6b
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/org/mozilla/fenix/FenixApplication.kt
View file @
c63fd3f9
...
...
@@ -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
...
...
app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt
View file @
c63fd3f9
...
...
@@ -734,7 +734,7 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
return
}
val
onTryAgain
:
(
Lo
ng
)
->
Unit
=
{
val
onTryAgain
:
(
Stri
ng
)
->
Unit
=
{
savedDownloadState
.
first
?.
let
{
dlState
->
store
.
dispatch
(
ContentAction
.
UpdateDownloadAction
(
...
...
app/src/main/java/org/mozilla/fenix/downloads/DynamicDownloadDialog.kt
View file @
c63fd3f9
...
...
@@ -27,7 +27,7 @@ class DynamicDownloadDialog(
private
val
container
:
ViewGroup
,
private
val
downloadState
:
DownloadState
?,
private
val
didFail
:
Boolean
,
private
val
tryAgain
:
(
Lo
ng
)
->
Unit
,
private
val
tryAgain
:
(
Stri
ng
)
->
Unit
,
private
val
onCannotOpenFile
:
()
->
Unit
,
private
val
view
:
View
,
private
val
toolbarHeight
:
Int
,
...
...
buildSrc/src/main/java/AndroidComponents.kt
View file @
c63fd3f9
...
...
@@ -3,5 +3,5 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
object
AndroidComponents
{
const
val
VERSION
=
"57.0.2020082
7190112
"
const
val
VERSION
=
"57.0.2020082
9130559
"
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment