Commit 9cef1e5a6f8635bc015c83e35effb07ad1e49ac6
automatically update profile tab when clicked if pending updates
Matt McKegg committed on 2/17/2017, 1:21:06 PMParent: ef301f3fa271aa2481d1d434966f4071f1ca82f5
Files changed
modules/page/html/render/profile.js | changed |
modules/page/html/render/profile.js | ||
---|---|---|
@@ -152,13 +152,15 @@ | ||
152 | 152 | h('section', [ namePicker, imagePicker ]) |
153 | 153 | ]) |
154 | 154 | ]) |
155 | 155 | |
156 | - return h('div', {className: 'SplitView'}, [ | |
156 | + var feedView = api.feed.html.rollup((opts) => { | |
157 | + return api.sbot.pull.userFeed(extend(opts, {id})) | |
158 | + }, { prepend }) | |
159 | + | |
160 | + var container = h('div', {className: 'SplitView'}, [ | |
157 | 161 | h('div.main', [ |
158 | - api.feed.html.rollup((opts) => { | |
159 | - return api.sbot.pull.userFeed(extend(opts, {id})) | |
160 | - }, { prepend }) | |
162 | + feedView | |
161 | 163 | ]), |
162 | 164 | h('div.side.-right', [ |
163 | 165 | when(friendsLoaded, |
164 | 166 | h('div', [ |
@@ -169,8 +171,12 @@ | ||
169 | 171 | h('div', {className: 'Loading'}) |
170 | 172 | ) |
171 | 173 | ]) |
172 | 174 | ]) |
175 | + | |
176 | + container.pendingUpdates = feedView.pendingUpdates | |
177 | + container.reload = feedView.reload | |
178 | + return container | |
173 | 179 | }) |
174 | 180 | |
175 | 181 | function renderContactBlock (title, profiles) { |
176 | 182 | return [ |
Built with git-ssb-web