damus.io

damus.io website
git clone git://jb55.com/damus.io
Log | Files | Refs | README

commit eec07c3b1bb52a1c113d970ba17d55702962ecb3
parent 94371bcc52dd20d411455bb220a9aaa1cf52f654
Author: William Casarin <jb55@jb55.com>
Date:   Fri,  4 Nov 2022 12:15:56 -0700

web: don't show threads in reply compose view

Sometimes it gets too large and scrolls of the screen. Temporary fix
until I have something better

Diffstat:
Mwebv2/damus.js | 6++++--
Mwebv2/index.html | 4++--
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/webv2/damus.js b/webv2/damus.js @@ -555,8 +555,10 @@ const DEFAULT_PROFILE = { display_name: "Anonymous", } -function render_thread_collapsed(model, reply_ev) +function render_thread_collapsed(model, reply_ev, opts) { + if (opts.is_composing) + return "" return `<div onclick="expand_thread('${reply_ev.id}')" class="thread-collapsed clickable">...</div>` } @@ -935,7 +937,7 @@ function reply_to(evid) { replying_to.dataset.evid = evid const ev = DSTATE.all_events[evid] - replying_to.innerHTML = render_event(DSTATE, ev, {is_composing: true, nobar: true, max_depth: 2}) + replying_to.innerHTML = render_event(DSTATE, ev, {is_composing: true, nobar: true, max_depth: 1}) modal.style.display = replying? "block" : "none"; } diff --git a/webv2/index.html b/webv2/index.html @@ -6,7 +6,7 @@ <title>Damus</title> - <link rel="stylesheet" href="damus.css?v=11"> + <link rel="stylesheet" href="damus.css?v=12"> </head> <body> <section class="header"> @@ -41,7 +41,7 @@ <script src="noble-secp256k1.js?v=1"></script> <script src="bech32.js?v=1"></script> <script src="nostr.js?v=6"></script> - <script src="damus.js?v=43"></script> + <script src="damus.js?v=44"></script> <script> // I have to delay loading to wait for nos2x const relay = setTimeout(damus_web_init, 100)