mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-19 19:46:50 +00:00
Update GLOBALS when new relay is added
This commit is contained in:
parent
83d4f23c01
commit
ed24e8b131
@ -20,6 +20,9 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
|
||||
let _ = GLOBALS
|
||||
.to_overlord
|
||||
.send(ToOverlordMessage::AddRelay(app.new_relay_url.clone()));
|
||||
if let Ok(db_relay) = DbRelay::new(app.new_relay_url.clone()){
|
||||
GLOBALS.relays.blocking_write().insert(test_url, db_relay);
|
||||
}
|
||||
app.new_relay_url = "".to_owned();
|
||||
*GLOBALS.status_message.blocking_write() = format!(
|
||||
"I asked the overlord to add relay {}. Check for it below.",
|
||||
@ -112,10 +115,6 @@ fn render_relay(ui: &mut Ui, relay: &DbRelay, bold: bool) {
|
||||
relay.dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
//if ui.button("CONNECT").clicked() {
|
||||
// ui.label("TBD");
|
||||
//}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user