Commit 7fcedd68ba11b29b833cf44059c4ed648f429b28
display pending updates on public tab
Matt McKegg committed on 2/15/2017, 2:38:55 PMParent: 9b14c2770a1b327ee389c1c27a56ae36412130c0
Files changed
modules/page/html/render/public.js | changed |
modules/page/html/render/public.js | ||
---|---|---|
@@ -61,50 +61,50 @@ | ||
61 | 61 … | } |
62 | 62 … | } |
63 | 63 … | }) |
64 | 64 … | |
65 | - return h('div.SplitView', [ | |
65 … | + var feedView = api.feed.html.rollup(getFeed, { | |
66 … | + waitUntil: computed([ | |
67 … | + following.sync, | |
68 … | + subscribedChannels.sync | |
69 … | + ], (...x) => x.every(Boolean)), | |
70 … | + windowSize: 500, | |
71 … | + filter: (item) => { | |
72 … | + return !item.boxed && ( | |
73 … | + id === item.author || | |
74 … | + following().has(item.author) || | |
75 … | + subscribedChannels().has(item.channel) || | |
76 … | + (item.repliesFrom && item.repliesFrom.has(id)) || | |
77 … | + item.digs && item.digs.has(id) | |
78 … | + ) | |
79 … | + }, | |
80 … | + bumpFilter: (msg, group) => { | |
81 … | + if (!group.message) { | |
82 … | + return ( | |
83 … | + isMentioned(id, msg.value.content.mentions) || | |
84 … | + msg.value.author === id || ( | |
85 … | + fromDay(msg, group.fromTime) && ( | |
86 … | + following().has(msg.value.author) || | |
87 … | + group.repliesFrom.has(id) | |
88 … | + ) | |
89 … | + ) | |
90 … | + ) | |
91 … | + } | |
92 … | + return true | |
93 … | + } | |
94 … | + }) | |
95 … | + | |
96 … | + var result = h('div.SplitView', [ | |
66 | 97 … | h('div.side', [ |
67 | 98 … | getSidebar() |
68 | 99 … | ]), |
69 | - h('div.main', [ | |
70 | - getFeedView() | |
71 | - ]) | |
100 … | + h('div.main', feedView) | |
72 | 101 … | ]) |
73 | 102 … | |
74 | - function getFeedView () { | |
75 | - return api.feed.html.rollup(getFeed, { | |
76 | - waitUntil: computed([ | |
77 | - following.sync, | |
78 | - subscribedChannels.sync | |
79 | - ], (...x) => x.every(Boolean)), | |
80 | - windowSize: 500, | |
81 | - filter: (item) => { | |
82 | - return !item.boxed && ( | |
83 | - id === item.author || | |
84 | - following().has(item.author) || | |
85 | - subscribedChannels().has(item.channel) || | |
86 | - (item.repliesFrom && item.repliesFrom.has(id)) || | |
87 | - item.digs && item.digs.has(id) | |
88 | - ) | |
89 | - }, | |
90 | - bumpFilter: (msg, group) => { | |
91 | - if (!group.message) { | |
92 | - return ( | |
93 | - isMentioned(id, msg.value.content.mentions) || | |
94 | - msg.value.author === id || ( | |
95 | - fromDay(msg, group.fromTime) && ( | |
96 | - following().has(msg.value.author) || | |
97 | - group.repliesFrom.has(id) | |
98 | - ) | |
99 | - ) | |
100 | - ) | |
101 | - } | |
102 | - return true | |
103 | - } | |
104 | - }) | |
105 | - } | |
103 … | + result.pendingUpdates = feedView.pendingUpdates | |
106 | 104 … | |
105 … | + return result | |
106 … | + | |
107 | 107 … | function getSidebar () { |
108 | 108 … | var whoToFollow = computed([following, api.profile.obs.recentlyUpdated(200)], (following, recent) => { |
109 | 109 … | return Array.from(recent).filter(x => x !== id && !following.has(x)).slice(0, 10) |
110 | 110 … | }) |
Built with git-ssb-web