aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEv Bogue <ev@evbogue.com>2019-08-17 11:25:56 -0500
committerEv Bogue <ev@evbogue.com>2019-08-17 11:25:56 -0500
commit77dba996f1cb1b80260103de97fb30047cdfdfb4 (patch)
treea57c735ff3ca8c0041f7acbf490b06e12cc29b40
parenta1993070b2199fa505b51f31e9685da32491b755 (diff)
make sure scroller has two childnodes in both views before streaming posts in
-rw-r--r--views.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/views.js b/views.js
index fc1293c..7c03c2c 100644
--- a/views.js
+++ b/views.js
@@ -5,10 +5,19 @@ function threadPage (src, keys) {
}
function profilePage (src, keys) {
+
var profile = h('div', {classList: 'profile'})
scroller.appendChild(profile)
+
+ if (src != keys.publicKey) {
+ reply = { author: src }
+ scroller.appendChild(composer(keys, reply))
+ } else {
+ scroller.appendChild(composer(keys))
+ }
+
var subs = [src]
sync(subs, keys)
@@ -141,18 +150,22 @@ function publicPage (keys) {
}
})
- scroller.appendChild(h('button', {
+ var div = h('div')
+
+ div.appendChild(h('button', {
onclick: function () {
localforage.clear().then(function () {location.reload()})
}
}, ['Delete Everything']))
- scroller.appendChild(h('button', {
+ div.appendChild(h('button', {
onclick: function () {
regenerate()
}
}, ['Regenerate']))
+ scroller.appendChild(div)
+
scroller.appendChild(composer(keys))
bog().then(log => {
if (log) {