git ssb

2+

mixmix / ticktack



Commit 2d319604d082cb2300af0e54c6416b00bdeb9884

filter threads for repeats

Dominic Tarr committed on 8/24/2017, 1:53:22 AM
Parent: 9b05eee01a12392729755fabfccef269c4748684

Files changed

app/page/home.jschanged
app/page/home.jsView
@@ -82,17 +82,21 @@
8282 m = Math.max(thread.replies[i].timestamp||0, m)
8383 return m
8484 }
8585
86+ var o = {}
8687 function roots (r) {
87- return Object.keys(r || {}).map(function (k) {
88- return threads.roots[r[k]]
88+ return Object.keys(r || {}).map(function (name) {
89+ var id = r[name]
90+ if(!o[id]) {
91+ o[id] = true
92+ return threads.roots[id]
93+ }
8994 }).filter(function (e) {
9095 return e && e.value
9196 })
9297 }
9398
94-
9599 var groupedThreads = roots(threads.private)
96100 .concat(roots(threads.channels))
97101 .concat(roots(threads.groups))
98102 .filter(function (thread) {
@@ -133,4 +137,15 @@
133137 ])
134138 })
135139 }
136140
141+
142+
143+
144+
145+
146+
147+
148+
149+
150+
151+

Built with git-ssb-web