Commit 38c9552eb48d80487fb4ca4e7ada763dd833f39c
reset download progress once completed
Matt McKegg committed on 12/15/2017, 3:44:16 AMParent: 9460421baaceb73b6c5819e685d30b5179c7e7c4
Files changed
modules/app/html/progress-notifier.js | changed |
modules/app/html/progress-notifier.js | ||
---|---|---|
@@ -29,11 +29,18 @@ | ||
29 | 29 | |
30 | 30 | var indexProgress = computed(indexes, calcProgress) |
31 | 31 | var migrationProgress = computed(migration, calcProgress) |
32 | 32 | |
33 | + var incompleteFeedsFrom = 0 | |
34 | + | |
33 | 35 | var downloadProgress = computed([replicateProgress.feeds, replicateProgress.incompleteFeeds], (feeds, incomplete) => { |
34 | - if (feeds) { | |
35 | - return clamp((feeds - incomplete) / feeds) | |
36 | + if (incomplete > incompleteFeedsFrom) { | |
37 | + incompleteFeedsFrom = incomplete | |
38 | + } else if (incomplete === 0) { | |
39 | + incompleteFeedsFrom = 0 | |
40 | + } | |
41 | + if (feeds && incomplete) { | |
42 | + return clamp((feeds - incomplete) / incompleteFeedsFrom) | |
36 | 43 | } else { |
37 | 44 | return 1 |
38 | 45 | } |
39 | 46 | }) |
Built with git-ssb-web