additional account relay list improvements

- Use the current selected account only to determine desired
  relays. Previously the desired relay list was determined from the
  union of all accounts.
- Update the relay configuration immediately when the user switches accounts.
- Delete relays from the account (instead of the relay pool
  directly). This results in the relay being removed in the pool as
  well, but is persisted correctly.
This commit is contained in:
Ken Sedgwick
2025-01-23 10:27:40 -08:00
parent 2cbae68a7f
commit 1e0801f54b
4 changed files with 66 additions and 18 deletions

View File

@@ -41,6 +41,7 @@ impl<'a> RelayPoolManager<'a> {
indices.iter().for_each(|index| self.remove_relay(*index));
}
// FIXME - this is not ever called?
pub fn add_relay(&mut self, ctx: &egui::Context, relay_url: String) {
let _ = self.pool.add_url(relay_url, create_wakeup(ctx));
}