Commit 9fff2bb9c8cf22a5430644eaf74038867de5071d
Merge branch 'master' of github.com:ticktackim/ticktack-wp1 into blogShow
mix irving committed on 10/20/2017, 1:54:12 AMParent: 8cdccd655d04dc269300a1a05a44a64319b38607
Parent: b97fb441a1afa288d695acd468056c823a35bf00
Files changed
app/page/userShow.js | changed |
app/page/userShow.mcss | changed |
app/page/userShow.js | ||
---|---|---|
@@ -11,11 +11,10 @@ | ||
11 | 11 | 'app.html.link': 'first', |
12 | 12 | 'app.html.blogCard': 'first', |
13 | 13 | 'contact.html.follow': 'first', |
14 | 14 | 'feed.pull.private': 'first', |
15 | - 'feed.pull.rollup': 'first', | |
15 | + 'sbot.pull.userFeed': 'first', | |
16 | 16 | 'keys.sync.id': 'first', |
17 | - 'state.obs.threads': 'first', | |
18 | 17 | 'translations.sync.strings': 'first', |
19 | 18 | }) |
20 | 19 | |
21 | 20 | exports.create = (api) => { |
@@ -47,23 +46,17 @@ | ||
47 | 46 | const Link = api.app.html.link |
48 | 47 | const userEditButton = Link({ page: 'userEdit', feed }, h('i.fa.fa-pencil')) |
49 | 48 | const directMessageButton = Link({ page: 'threadNew', feed }, h('Button', strings.userShow.action.directMessage)) |
50 | 49 | |
51 | - const threads = MutantArray() | |
50 | + const BLOG_TYPES = ['blog', 'post'] | |
51 | + const blogs = MutantArray() | |
52 | 52 | pull( |
53 | 53 | // next(api.feed.pull.private, {reverse: true, limit: 100, live: false}, ['value', 'timestamp']), |
54 | 54 | // api.feed.pull.private({reverse: true, limit: 100, live: false}), |
55 | - api.feed.pull.private({reverse: true, live: false}), | |
56 | - pull.filter(msg => { | |
57 | - const recps = get(msg, 'value.content.recps') | |
58 | - if (!recps) return | |
59 | - | |
60 | - return recps | |
61 | - .map(r => typeof r === 'object' ? r.link : r) | |
62 | - .includes(feed) | |
63 | - }), | |
64 | - api.feed.pull.rollup(), | |
65 | - pull.drain(threads.push) | |
55 | + api.sbot.pull.userFeed({id: feed, reverse: true, live: false}), | |
56 | + pull.filter(msg => BLOG_TYPES.includes(get(msg, 'value.content.type'))), | |
57 | + pull.filter(msg => get(msg, 'value.content.root') === undefined), | |
58 | + pull.drain(blogs.push) | |
66 | 59 | // Scroller(content, scrollerContent, render, false, false) |
67 | 60 | ) |
68 | 61 | |
69 | 62 | return h('Page -userShow', {title: name}, [ |
@@ -82,9 +75,9 @@ | ||
82 | 75 | h('div.directMessage', directMessageButton) |
83 | 76 | ]) |
84 | 77 | : '', |
85 | 78 | ]), |
86 | - h('section.blogs', map(threads, api.app.html.blogCard)) | |
79 | + h('section.blogs', map(blogs, api.app.html.blogCard)) | |
87 | 80 | ]) |
88 | 81 | ]) |
89 | 82 | } |
90 | 83 | } |
Built with git-ssb-web