damus.io

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

commit a024cc558d80fd0ea981328063f4b58c7a8fd022
parent 2ab552f5f8e8b4bce698fb8278f982b1d8101a50
Author: William Casarin <jb55@jb55.com>
Date:   Wed,  9 Nov 2022 12:25:19 -0800

web: don't render deleted events when we don't need to

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

diff --git a/webv2/damus.js b/webv2/damus.js @@ -823,11 +823,13 @@ function render_event(model, ev, opts={}) { const has_bot_line = opts.is_reply const reply_line_bot = (has_bot_line && render_reply_line_bot()) || "" + const deleted = is_deleted(model, ev.id) + if (deleted && !opts.is_reply) + return "" + const replied_events = render_replied_events(model, ev, opts) const reply_line_top = replied_events === "" ? "" : render_reply_line_top() - const deleted = is_deleted(model, ev.id) - return ` ${replied_events} <div id="ev${ev.id}" class="comment"> diff --git a/webv2/index.html b/webv2/index.html @@ -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=52"></script> + <script src="damus.js?v=53"></script> <script> // I have to delay loading to wait for nos2x const relay = setTimeout(damus_web_init, 100)