git ssb

2+

ev / mvd



Commit 891c61c1b10c0585beba1672fbf7fb5a3968b303

use pull-more for chronological stream of everything

Ev Bogue committed on 6/8/2018, 10:33:56 PM
Parent: ed660848f5d066e765c79584129a624f08e8f953

Files changed

views.jschanged
views.jsView
@@ -249,34 +249,25 @@
249249 var screen = document.getElementById('screen')
250250
251251 screen.appendChild(hyperscroll(content))
252252
253- function newStream () {
253 + function createStream (opts) {
254254 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 }}}}]}),
256256 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) {
266257 return render(msg)
267258 })
268259 )
269260 }
270261
271262 pull(
272- oldStream(),
273- stream.bottom(content)
263 + createStream({old: false, live: true, limit: 10}),
264 + stream.top(content)
274265 )
275266
276267 pull(
277- newStream(),
278- stream.top(content)
268 + createStream({reverse: true, live: false, limit: 10}),
269 + stream.bottom(content)
279270 )
280271 }
281272
282273 function hash () {

Built with git-ssb-web