git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Commit 38c9552eb48d80487fb4ca4e7ada763dd833f39c

reset download progress once completed

Matt McKegg committed on 12/15/2017, 3:44:16 AM
Parent: 9460421baaceb73b6c5819e685d30b5179c7e7c4

Files changed

modules/app/html/progress-notifier.jschanged
modules/app/html/progress-notifier.jsView
@@ -29,11 +29,18 @@
2929
3030 var indexProgress = computed(indexes, calcProgress)
3131 var migrationProgress = computed(migration, calcProgress)
3232
33+ var incompleteFeedsFrom = 0
34+
3335 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)
3643 } else {
3744 return 1
3845 }
3946 })

Built with git-ssb-web