git ssb

0+

noffle / %MbZg2FUvpSxIgWf1KBr…



forked from ev / sdash

Commit dcf9fdef37a0d789731415d11d08d29e777cf1ed

add callback, as sometimes the post showed up as the last post called

Ev Bogue committed on 9/3/2016, 5:44:46 AM
Parent: f764460e75e9d5babcd1180c26c9ac5ba849ac2d

Files changed

index.jschanged
index.jsView
@@ -33,11 +33,14 @@
3333 pull(
3434 sbot.query.read({query: [{$filter: { value: { author: key, content: {type: 'post'}}}}], limit: 1, reverse: true}),
3535 pull.drain(function (data) {
3636 post = data;
37+ gotPost()
3738 })
3839 )
39- res.render('profile', {avatar, bloburl, key, markdown, moment});
40+ function gotPost() {
41+ res.render('profile', {avatar, bloburl, key, markdown, moment});
42+ }
4043 })
4144 })
4245 });
4346
@@ -55,11 +58,14 @@
5558 pull(
5659 sbot.query.read({query: [{$filter: { value: { author: key, content: {type: 'post'}}}}], limit: 1, reverse: true}),
5760 pull.drain(function (data) {
5861 post = data;
62+ gotPost()
5963 })
6064 )
61- res.render('profile', {avatar, bloburl, key, markdown, moment});
65+ function gotPost() {
66+ res.render('profile', {avatar, bloburl, key, markdown, moment});
67+ }
6268 })
6369 })
6470 });
6571

Built with git-ssb-web