Commit aa219ac49a8726ef074556f07460f7bfdd79e683
remove PMs + my posts from /notifications
mix irving committed on 2/10/2018, 10:56:53 PMParent: ab0cfd9162ed08e4f61975edf5f604162dcd8b32
Files changed
app/page/notifications.js | changed |
app/page/notifications.js | |||
---|---|---|---|
@@ -37,20 +37,26 @@ | |||
37 | 37 … | const id = api.keys.sync.id() | |
38 | 38 … | ||
39 | 39 … | const { filterMenu, filterDownThrough, filterUpThrough, resetFeed } = api.app.html.filter(draw) | |
40 | 40 … | const { container, content } = api.app.html.scroller({ prepend: [ filterMenu ] }) | |
41 … | + const removeMyMessages = () => pull.filter(msg => msg.value.author !== id) | ||
42 … | + const removePrivateMessages = () => pull.filter(msg => msg.value.private !== true) | ||
41 | 43 … | ||
42 | 44 … | function draw () { | |
43 | 45 … | resetFeed({ container, content }) | |
44 | 46 … | ||
45 | 47 … | pull( | |
46 | 48 … | next(api.feed.pull.mentions(id), {old: false, limit: 100}), | |
49 … | + removeMyMessages(), | ||
50 … | + removePrivateMessages(), | ||
47 | 51 … | filterDownThrough(), | |
48 | 52 … | Scroller(container, content, api.message.html.render, true, false) | |
49 | 53 … | ) | |
50 | 54 … | ||
51 | 55 … | pull( | |
52 | 56 … | next(api.feed.pull.mentions(id), {reverse: true, limit: 100, live: false}), | |
57 … | + removeMyMessages(), | ||
58 … | + removePrivateMessages(), | ||
53 | 59 … | filterUpThrough(), | |
54 | 60 … | Scroller(container, content, api.message.html.render, false, false) | |
55 | 61 … | ) | |
56 | 62 … | } | |
Built with git-ssb-web