git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Commit d66efb8ebb52d71d88c8afb1b057bb89452c120f

show compact message when root is a fork

Matt McKegg committed on 11/20/2017, 2:58:11 AM
Parent: 43227d5b2a248b928fbf666ecdf2f1e54a7ecd4b

Files changed

modules/feed/html/rollup.jschanged
modules/page/html/render/public.jschanged
modules/feed/html/rollup.jsView
@@ -195,9 +195,9 @@
195195 var replies = item.replies.filter(isReply).sort(byAssertedTime)
196196 var replyElements = replies.filter(displayFilter).slice(-3).map((msg) => {
197197 var result = api.message.html.render(msg, {
198198 previousId,
199- compact: compactFilter(msg),
199+ compact: compactFilter(msg, item),
200200 priority: highlightItems.has(msg.key) ? 2 : 0
201201 })
202202 previousId = msg.key
203203 return [
modules/page/html/render/public.jsView
@@ -18,8 +18,9 @@
1818 'invite.sheet': 'first',
1919
2020 'message.html.compose': 'first',
2121 'message.async.publish': 'first',
22+ 'message.sync.root': 'first',
2223 'progress.html.peer': 'first',
2324
2425 'feed.html.rollup': 'first',
2526 'profile.obs.recentlyUpdated': 'first',
@@ -104,8 +105,14 @@
104105 lastMessage = msg
105106 return true
106107 }
107108 },
109+ compactFilter: function (msg, root) {
110+ if (!root && api.message.sync.root(msg)) {
111+ // msg has a root, but is being displayed as root (fork)
112+ return true
113+ }
114+ },
108115 waitFor: computed([
109116 following.sync,
110117 subscribedChannels.sync
111118 ], (...x) => x.every(Boolean))

Built with git-ssb-web