close-all and open-all buttons

This commit is contained in:
Mike Dilger 2022-12-30 11:33:34 +13:00
parent aeab1e98b1
commit ac49a8828d

View File

@ -21,7 +21,6 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, frame: &mut eframe::Fram
let incoming_count = GLOBALS.incoming_events.blocking_read().len();
ui.with_layout(Layout::right_to_left(Align::TOP), |ui| {
ui.with_layout(Layout::top_down(Align::Max), |ui| {
if ui
.button(&format!(
"Query relays for {} missing events",
@ -36,9 +35,7 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, frame: &mut eframe::Fram
json_payload: serde_json::to_string("").unwrap(),
});
}
});
ui.with_layout(Layout::top_down(Align::Max), |ui| {
if ui
.button(&format!("Process {} incoming events", incoming_count))
.clicked()
@ -50,7 +47,13 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, frame: &mut eframe::Fram
json_payload: serde_json::to_string("").unwrap(),
});
}
});
if ui.button("▶ close all" ).clicked() {
app.hides = feed.clone();
}
if ui.button("▼ open all").clicked() {
app.hides.clear();
}
});
ui.vertical(|ui| {