Commit b3cef6b8b9f06ee8809214af5a022124d25cac40
fix weird partial refreshed feeds bug
Matt McKegg committed on 3/15/2017, 11:06:46 PMParent: 1d6fd23c30839bf244cdf6f1eb375de93047df31
Files changed
modules/feed/html/rollup.js | changed |
modules/feed/html/rollup.js | ||
---|---|---|
@@ -54,11 +54,9 @@ | ||
54 | 54 | h('strong', [updates]), ' ', |
55 | 55 | when(computed(updates, a => a === 1), 'update', 'updates') |
56 | 56 | ]) |
57 | 57 | |
58 | - var content = h('section.content', { | |
59 | - hidden: computed(sync, s => !s) | |
60 | - }) | |
58 | + var content = Value() | |
61 | 59 | |
62 | 60 | var container = h('Scroller', { |
63 | 61 | style: { overflow: 'auto' } |
64 | 62 | }, [ |
@@ -126,10 +124,15 @@ | ||
126 | 124 | abortLastFeed() |
127 | 125 | } |
128 | 126 | updates.set(0) |
129 | 127 | sync.set(false) |
130 | - content.innerHTML = '' | |
131 | 128 | |
129 | + content.set( | |
130 | + h('section.content', { | |
131 | + hidden: computed(sync, s => !s) | |
132 | + }) | |
133 | + ) | |
134 | + | |
132 | 135 | var abortable = Abortable() |
133 | 136 | abortLastFeed = abortable.abort |
134 | 137 | |
135 | 138 | pull( |
@@ -144,9 +147,9 @@ | ||
144 | 147 | return true |
145 | 148 | } |
146 | 149 | }), |
147 | 150 | abortable, |
148 | - Scroller(container, content, renderItem, false, false) | |
151 | + Scroller(container, content(), renderItem, false, false) | |
149 | 152 | ) |
150 | 153 | } |
151 | 154 | |
152 | 155 | function renderItem (item) { |
Built with git-ssb-web