Commit 462de772ed178e879d70a437689893ff60d1f99e
Show follow/block counts
cel committed on 6/18/2018, 4:52:26 PMParent: 7793a1d33d0e76b7ae7490a974f5f171520b94d7
Files changed
lib/render.js | changed |
lib/render.js | ||
---|---|---|
@@ -591,11 +591,22 @@ | ||
591 | 591 … | var name = about && about.name || id.substr(0, 8) + '…' |
592 | 592 … | cb(null, h('a', {href: self.toUrl(prefix + id)}, name)) |
593 | 593 … | }) |
594 | 594 … | }, 8), |
595 | - pull.map(function (el) { | |
596 | - return [el, ' '] | |
597 | - }), | |
598 | - pull.flatten(), | |
599 | - pull.map(u.toHTML) | |
595 … | + function (read) { | |
596 … | + var count = 0 | |
597 … | + var ended | |
598 … | + return function (abort, cb) { | |
599 … | + if (ended) return cb(ended) | |
600 … | + read(abort, function (end, el) { | |
601 … | + if (end === true) { | |
602 … | + ended = true | |
603 … | + cb(null, '(' + count + ')') | |
604 … | + } else { | |
605 … | + count++ | |
606 … | + cb(end, u.toHTML(el) + ' ') | |
607 … | + } | |
608 … | + }) | |
609 … | + } | |
610 … | + } | |
600 | 611 … | ) |
601 | 612 … | } |
Built with git-ssb-web