Commit be97310ba77e911f481f4dbae3cb4928d1fa6f9b
hide posts on profile page when blocked
Matt McKegg committed on 10/14/2017, 2:15:10 AMParent: dbcaed4a38e2a45014c7a8a7e73a0b5e53164c31
Files changed
modules/page/html/render/profile.js | changed |
modules/page/html/render/profile.js | ||
---|---|---|
@@ -192,9 +192,10 @@ | ||
192 | 192 | |
193 | 193 | var feedView = api.feed.html.rollup(api.feed.pull.profile(id), { |
194 | 194 | prepend, |
195 | 195 | displayFilter: (msg) => msg.value.author === id, |
196 | - bumpFilter: (msg) => msg.value.author === id, | |
196 | + rootFilter: (msg) => !youBlock(), | |
197 | + bumpFilter: (msg) => msg.value.author === id | |
197 | 198 | }) |
198 | 199 | |
199 | 200 | var container = h('div', {className: 'SplitView'}, [ |
200 | 201 | h('div.main', [ |
@@ -212,8 +213,11 @@ | ||
212 | 213 | ) |
213 | 214 | ]) |
214 | 215 | ]) |
215 | 216 | |
217 | + // refresh feed (to hide all posts) when blocked | |
218 | + youBlock(feedView.reload) | |
219 | + | |
216 | 220 | container.pendingUpdates = feedView.pendingUpdates |
217 | 221 | container.reload = feedView.reload |
218 | 222 | return container |
219 | 223 | }) |
Built with git-ssb-web