git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Commit 2b4bd6561cd0949af862be8fed0c03013cd2d9d4

fix display of fork messages on root rollup and include fork roots in public feed

Matt McKegg committed on 11/6/2017, 12:27:40 PM
Parent: b8dcb5e1ae317132d4e8498b59e5279fcf92490f

Files changed

modules/feed/html/rollup.jschanged
package.jsonchanged
modules/feed/html/rollup.jsView
@@ -1,6 +1,6 @@
11 var nest = require('depnest')
2-var {Value, Proxy, Array: MutantArray, h, computed, when, onceTrue, throttle} = require('mutant')
2+var {Value, Proxy, Array: MutantArray, h, computed, when, onceTrue, throttle, resolve} = require('mutant')
33 var pull = require('pull-stream')
44 var Abortable = require('pull-abortable')
55 var Scroller = require('../../../lib/scroller')
66 var nextStepper = require('../../../lib/next-stepper')
@@ -22,12 +22,14 @@
2222 'about.obs.name': 'first',
2323 'app.sync.externalHandler': 'first',
2424 'message.html.canRender': 'first',
2525 'message.html.render': 'first',
26+ 'message.sync.isBlocked': 'first',
2627 'profile.html.person': 'first',
2728 'message.html.link': 'first',
2829 'message.sync.root': 'first',
2930 'feed.pull.rollup': 'first',
31+ 'feed.pull.withReplies': 'first',
3032 'sbot.async.get': 'first',
3133 'keys.sync.id': 'first',
3234 'intl.sync.i18n': 'first',
3335 'message.html.missing': 'first'
@@ -152,11 +154,16 @@
152154 }))
153155
154156 pull(
155157 stream,
156- prefiltered ? pull.through() : pull.filter(bumpFilter),
157158 abortable,
158- api.feed.pull.rollup(rootFilter),
159+ prefiltered ? pull(
160+ pull.filter(msg => !api.message.sync.isBlocked(msg)),
161+ api.feed.pull.withReplies()
162+ ) : pull(
163+ pull.filter(bumpFilter),
164+ api.feed.pull.rollup(rootFilter)
165+ ),
159166 scroller
160167 )
161168 })
162169 }
@@ -200,8 +207,9 @@
200207 })
201208
202209 var renderedMessage = api.message.html.render(item, {
203210 compact: compactFilter(item),
211+ includeForks: false, // this is a root message, so forks are already displayed as replies
204212 priority: highlightItems.has(item.key) ? 2 : 0
205213 })
206214
207215 if (!renderedMessage) return h('div')
package.jsonView
@@ -40,9 +40,9 @@
4040 "mutant": "^3.21.2",
4141 "mutant-pull-reduce": "^1.1.0",
4242 "obv": "0.0.1",
4343 "patch-settings": "^1.0.1",
44- "patchcore": "~1.15.1",
44+ "patchcore": "~1.16.0",
4545 "pull-abortable": "^4.1.0",
4646 "pull-defer": "^0.2.2",
4747 "pull-file": "~1.0.0",
4848 "pull-identify-filetype": "^1.1.0",

Built with git-ssb-web