commit d643e2d06b2d5e9ee2dae8304ab00f0b3d528910
parent 70d0df5240a02bd0045ec6d57a8428bdf5b74567
Author: William Casarin <jb55@jb55.com>
Date: Mon, 14 Nov 2022 18:04:56 -0800
web: fix re-rendering on reaction
Diffstat:
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/web/js/damus.js b/web/js/damus.js
@@ -350,26 +350,23 @@ function handle_home_event(ids, model, relay, sub_id, ev) {
ev = model.all_events[ev.id]
- let is_new = false
switch (sub_id) {
case ids.explore:
const view = model.views.explore
if (should_add_to_explore_timeline(view, ev)) {
view.seen.add(ev.pubkey)
- is_new = insert_event_sorted(view.events, ev)
+ insert_event_sorted(view.events, ev)
}
- if (is_new)
- handle_redraw_logic(model, 'explore')
+ handle_redraw_logic(model, 'explore')
break;
case ids.home:
if (should_add_to_timeline(ev))
- is_new = insert_event_sorted(model.views.home.events, ev)
+ insert_event_sorted(model.views.home.events, ev)
- if (is_new)
- handle_redraw_logic(model, 'home')
+ handle_redraw_logic(model, 'home')
break;
case ids.account:
switch (ev.kind) {