git ssb

1+

Dominic / secure-scuttlebutt



Commit 2f8f9c1b473fe1fad723c98f70206e024ffe6d42

fix index regeration progress

Dominic Tarr committed on 6/10/2017, 2:05:22 AM
Parent: 03c9daeb104b3ddf3c69242f7bcf4e5c0e4e24c4

Files changed

db.jschanged
db.jsView
@@ -21,9 +21,9 @@
2121
2222 db.progress = {}
2323 var prog = db.progress.indexes = {start: 0, current: 0, target: 0}
2424 var ts = Date.now()
25- db.since.once(function (v) { prog.start = v })
25+
2626 db.since(function () {
2727 prog.target = db.since.value
2828 if(Date.now() > ts + 100)
2929 update()
@@ -41,14 +41,19 @@
4141 }
4242 prog.current = ~~(current / n)
4343 //if the progress bar is complete, move the starting point
4444 //up to the current position!
45- if(prog.current === prog.target)
45+ if(prog.start <= 0)
4646 prog.start = prog.current
47+ else if(prog.current == prog.target)
48+ prog.start = prog.target
49+
4750 }
4851
4952 setInterval(update, 200).unref()
5053
5154 return db
5255 }
5356
5457
58+
59+

Built with git-ssb-web