Commit 891c61c1b10c0585beba1672fbf7fb5a3968b303
use pull-more for chronological stream of everything
Ev Bogue committed on 6/8/2018, 10:33:56 PMParent: ed660848f5d066e765c79584129a624f08e8f953
Files changed
views.js | changed |
views.js | ||
---|---|---|
@@ -249,34 +249,25 @@ | ||
249 | 249 … | var screen = document.getElementById('screen') |
250 | 250 … | |
251 | 251 … | screen.appendChild(hyperscroll(content)) |
252 | 252 … | |
253 | - function newStream () { | |
253 … | + function createStream (opts) { | |
254 | 254 … | return pull( |
255 | - sbot.query({query: [{$filter: { value: { timestamp: { $gt: 0 }}}}], old: false, live: true}), | |
255 … | + More(sbot.query, opts, {query: [{$filter: { value: { timestamp: { $gt: 0 }}}}]}), | |
256 | 256 … | pull.map(function (msg) { |
257 | - return render(msg) | |
258 | - }) | |
259 | - ) | |
260 | - } | |
261 | - | |
262 | - function oldStream () { | |
263 | - return pull( | |
264 | - sbot.query({query: [{$filter: { value: { timestamp: { $gt: 0 }}}}], reverse: true, live: false}), | |
265 | - pull.map(function (msg) { | |
266 | 257 … | return render(msg) |
267 | 258 … | }) |
268 | 259 … | ) |
269 | 260 … | } |
270 | 261 … | |
271 | 262 … | pull( |
272 | - oldStream(), | |
273 | - stream.bottom(content) | |
263 … | + createStream({old: false, live: true, limit: 10}), | |
264 … | + stream.top(content) | |
274 | 265 … | ) |
275 | 266 … | |
276 | 267 … | pull( |
277 | - newStream(), | |
278 | - stream.top(content) | |
268 … | + createStream({reverse: true, live: false, limit: 10}), | |
269 … | + stream.bottom(content) | |
279 | 270 … | ) |
280 | 271 … | } |
281 | 272 … | |
282 | 273 … | function hash () { |
Built with git-ssb-web