From 77dba996f1cb1b80260103de97fb30047cdfdfb4 Mon Sep 17 00:00:00 2001 From: Ev Bogue Date: Sat, 17 Aug 2019 11:25:56 -0500 Subject: make sure scroller has two childnodes in both views before streaming posts in --- views.js | 17 +++++++++++++++-- 1 file 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) { -- cgit v1.2.3-70-g09d2