On live relays page, show which people don't have full coverage

This commit is contained in:
Mike Dilger 2023-02-04 12:06:44 +13:00
parent f9d6a58be0
commit 6b64047e75

View File

@ -70,6 +70,23 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, frame: &mut eframe::Fram
});
});
});
ui.add_space(10.0);
ui.separator();
ui.add_space(10.0);
for (pk,count) in GLOBALS.relay_picker.blocking_read().pubkey_counts.iter() {
let maybe_person = GLOBALS.people.get(pk);
let name = match maybe_person {
None => GossipUi::hex_pubkey_short(pk),
Some(p) => match p.name() {
None => GossipUi::hex_pubkey_short(pk),
Some(n) => n.to_owned()
}
};
ui.label(format!("{} seeks {} more relays", name, count));
}
} else if app.page == Page::RelaysAll {
all::update(app, ctx, frame, ui);
}