git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Commit be97310ba77e911f481f4dbae3cb4928d1fa6f9b

hide posts on profile page when blocked

Matt McKegg committed on 10/14/2017, 2:15:10 AM
Parent: dbcaed4a38e2a45014c7a8a7e73a0b5e53164c31

Files changed

modules/page/html/render/profile.jschanged
modules/page/html/render/profile.jsView
@@ -192,9 +192,10 @@
192192
193193 var feedView = api.feed.html.rollup(api.feed.pull.profile(id), {
194194 prepend,
195195 displayFilter: (msg) => msg.value.author === id,
196- bumpFilter: (msg) => msg.value.author === id,
196+ rootFilter: (msg) => !youBlock(),
197+ bumpFilter: (msg) => msg.value.author === id
197198 })
198199
199200 var container = h('div', {className: 'SplitView'}, [
200201 h('div.main', [
@@ -212,8 +213,11 @@
212213 )
213214 ])
214215 ])
215216
217+ // refresh feed (to hide all posts) when blocked
218+ youBlock(feedView.reload)
219+
216220 container.pendingUpdates = feedView.pendingUpdates
217221 container.reload = feedView.reload
218222 return container
219223 })

Built with git-ssb-web