@@ -719,6 +719,11 @@ class Uppy {
this.setState({ files: files })
})
+ this.on('restored', () => {
+ // Files may have changed--ensure progress is still accurate.
+ this._calculateTotalProgress()
+ })
+
// show informer if offline
if (typeof window !== 'undefined') {
window.addEventListener('online', () => this.updateOnlineStatus())
@@ -172,9 +172,6 @@ module.exports = class GoldenRetriever extends Plugin {
this.uppy.setState({
files: updatedFiles
- // Files have changed--make sure the progress is accurate.
- // TODO make uppy detect that this is necessary somehow?
- this.uppy._calculateTotalProgress()
this.uppy.emit('restored', this.savedPluginData)