ui: feed: skip events that are not TextNotes (just in case get_feed is buggy)

This commit is contained in:
Mike Dilger 2022-12-23 15:51:15 +13:00
parent fdd0e8ab01
commit 561421f35a

View File

@ -1,7 +1,7 @@
use super::GossipUi;
use eframe::egui;
use egui::{Align, Color32, Context, Layout, RichText, ScrollArea, TextStyle, Ui, Vec2};
use nostr_proto::{Id, PublicKey};
use nostr_proto::{EventKind, Id, PublicKey};
use tracing::info;
pub(super) fn update(app: &mut GossipUi, ctx: &Context, frame: &mut eframe::Frame, ui: &mut Ui) {
@ -62,6 +62,11 @@ fn render_post(
} // don't render related info w/o nostr event.
let event = fevent.event.as_ref().unwrap().to_owned();
// Only render TextNote events
if event.kind != EventKind::TextNote {
return;
}
let maybe_person = crate::globals::GLOBALS
.people
.blocking_lock()