my relays: fix duplicate search field

This commit is contained in:
Bu5hm4nn 2023-10-02 17:55:23 -06:00
parent 2c5239fd5d
commit b14f4793ed

View File

@ -13,16 +13,6 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
ui.horizontal_wrapped(|ui| {
ui.heading(Page::RelaysMine.name());
ui.set_enabled(!is_editing);
ui.add_space(10.0);
if ui.button("Advertise Relay List")
.on_hover_text("Advertise my relays. Will send 10002 kind to all relays that have 'ADVERTISE' usage enabled")
.clicked() {
let _ = GLOBALS
.to_overlord
.send(ToOverlordMessage::AdvertiseRelayList);
}
ui.add_space(50.0);
widgets::search_filter_field(ui, &mut app.relays.search, 200.0);
ui.with_layout(egui::Layout::right_to_left(egui::Align::Min), |ui| {
ui.add_space(20.0);
super::configure_list_btn(app, ui);
@ -32,6 +22,14 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
super::relay_sort_combo(app, ui);
ui.add_space(20.0);
widgets::search_filter_field(ui, &mut app.relays.search, 200.0);
ui.add_space(200.0); // search_field somehow doesn't "take up" space
if ui.button("Advertise Relay List")
.on_hover_text("Advertise my relays. Will send 10002 kind to all relays that have 'ADVERTISE' usage enabled")
.clicked() {
let _ = GLOBALS
.to_overlord
.send(ToOverlordMessage::AdvertiseRelayList);
}
});
});
ui.add_space(10.0);