diff options
author | Ev Bogue <ev@evbogue.com> | 2019-08-17 11:25:56 -0500 |
---|---|---|
committer | Ev Bogue <ev@evbogue.com> | 2019-08-17 11:25:56 -0500 |
commit | 77dba996f1cb1b80260103de97fb30047cdfdfb4 (patch) | |
tree | a57c735ff3ca8c0041f7acbf490b06e12cc29b40 | |
parent | a1993070b2199fa505b51f31e9685da32491b755 (diff) |
make sure scroller has two childnodes in both views before streaming posts in
-rw-r--r-- | views.js | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -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) { |