git ssb

10+

Matt McKegg / patchwork



Commit 7d39f00f5d8cc46d121b4197b45fa1dc145ec3da

update gatherings view when replies added

Matt McKegg committed on 6/21/2017, 1:17:54 AM
Parent: ff719d8d11108e133fbe0b77d5e7229f2412dd3e

Files changed

modules/feed/html/rollup.jschanged
modules/page/html/render/gatherings.jschanged
modules/feed/html/rollup.jsView
@@ -39,8 +39,9 @@
3939 prepend,
4040 rootFilter = returnTrue,
4141 bumpFilter = returnTrue,
4242 displayFilter = returnTrue,
43 + updateStream = getStream, // override the stream used for realtime updates
4344 waitFor = true
4445 }) {
4546 var updates = Value(0)
4647 var yourId = api.keys.sync.id()
@@ -69,9 +70,9 @@
6970 refresh()
7071
7172 // display pending updates
7273 pull(
73- getStream({old: false}),
74 + updateStream({old: false}),
7475 LookupRoot(),
7576 pull.filter((msg) => {
7677 return rootFilter(msg.root || msg) && bumpFilter(msg)
7778 }),
modules/page/html/render/gatherings.jsView
@@ -3,8 +3,9 @@
33
44 exports.needs = nest({
55 'feed.pull.type': 'first',
66 'feed.html.rollup': 'first',
7 + 'feed.pull.public': 'first',
78 'gathering.sheet.edit': 'first'
89 })
910
1011 exports.gives = nest('page.html.render')
@@ -23,9 +24,13 @@
2324 ])
2425 ])
2526 ]
2627
27- return api.feed.html.rollup(api.feed.pull.type('gathering'), { prepend, windowSize: 100 })
28 + return api.feed.html.rollup(api.feed.pull.type('gathering'), {
29 + prepend,
30 + rootFilter: (msg) => msg.value.content.type === 'gathering',
31 + updateStream: api.feed.pull.public
32 + })
2833 })
2934
3035 function createGathering () {
3136 api.gathering.sheet.edit()

Built with git-ssb-web