git ssb

2+

ev / mvd



Commit f517e408199ddd220b54015d3442f2bbde7951ac

everything stream kind of works

Ev Bogue committed on 6/9/2018, 5:06:17 PM
Parent: 891c61c1b10c0585beba1672fbf7fb5a3968b303

Files changed

views.jschanged
views.jsView
@@ -203,9 +203,8 @@
203203 } else {
204204 content.appendChild(rootMsg)
205205 }
206206 })
207-
208207 }
209208
210209 var keyPage = function () {
211210 var screen = document.getElementById('screen')
@@ -242,35 +241,57 @@
242241
243242 screen.appendChild(hyperscroll(content))
244243 }
245244
245 +var nested = require('libnested')
246 +
246247 function everythingStream () {
247- var content = h('div.content')
248248
249249 var screen = document.getElementById('screen')
250 + var content = h('div.content')
250251
251252 screen.appendChild(hyperscroll(content))
252253
253- function createStream (opts) {
254 + /*function createStream (opts) {
254255 return pull(
255- More(sbot.query, opts, {query: [{$filter: { value: { timestamp: { $gt: 0 }}}}]}),
256 + More(sbot.query, opts, [{$filter: { value: { timestamp: { $gt: 0 }}}}]),
256257 pull.map(function (msg) {
257258 return render(msg)
258259 })
259260 )
260261 }
261262
262263 pull(
263- createStream({old: false, live: true, limit: 10}),
264 + createStream({ limit: 10, old: false}),
264265 stream.top(content)
265266 )
266267
267268 pull(
268- createStream({reverse: true, live: false, limit: 10}),
269 + createStream({limit: 10, live: false, reverse: true}),
269270 stream.bottom(content)
271 + )*/
272 +
273 + function createStream (opts) {
274 + return pull(
275 + sbot.query({query: [{$filter: { value: { timestamp: { $gt: 0 }}}}], reverse: true}),
276 + pull.map(function (msg) {
277 + return render(msg)
278 + })
279 + )
280 + }
281 +
282 + /*pull(
283 + createStream({old: false}),
284 + stream.top(content)
285 + )*/
286 +
287 + pull(
288 + createStream(),
289 + stream.bottom(content)
270290 )
271291 }
272292
293 +
273294 function hash () {
274295 return window.location.hash.substring(1)
275296 }
276297

Built with git-ssb-web