Commit 6ec0db7801b46b66f52d44d1d0a6006fdc71b53f
Merge pull request #14 from ticktackim/fix_incorrect_thread_bug
give threadCards an id to help morphdom morphmix irving authored on 8/15/2017, 11:38:55 PM
GitHub committed on 8/15/2017, 11:38:55 PM
Parent: f2c1e3d81bf5bba14c878872f1c99529d7eb2be5
Parent: 10e8c91563f5a738f61713a572984b0e402338ef
Files changed
app/html/thread-card.js | changed |
app/html/thread-card.js | ||
---|---|---|
@@ -85,10 +85,12 @@ | ||
85 | 85 | const lastReply = thread.replies && maxBy(thread.replies, r => r.timestamp) |
86 | 86 | const replySample = lastReply ? subject(lastReply) : null |
87 | 87 | |
88 | 88 | const onClick = opts.onClick || function () { api.history.sync.push(thread) } |
89 | + const id = `${thread.key}-${JSON.stringify(opts)}` | |
90 | + // id is only here to help morphdom morph accurately | |
89 | 91 | |
90 | - return h('div.thread', {'ev-click': onClick }, [ | |
92 | + return h('div.thread', { 'ev-click': onClick, id }, [ | |
91 | 93 | h('div.context', threadIcon(thread)), |
92 | 94 | h('div.content', [ |
93 | 95 | subjectEl, |
94 | 96 | replySample ? h('div.reply', [ |
Built with git-ssb-web