mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 08:21:47 +00:00
Fix display after setting relay manually
This commit is contained in:
parent
adc16199d8
commit
cdcd23f072
@ -731,6 +731,13 @@ impl Overlord {
|
||||
pr.manually_paired_write = true;
|
||||
GLOBALS.storage.write_person_relay(&pr, None)?;
|
||||
|
||||
if let Some(pk) = GLOBALS.people.get_active_person_async().await {
|
||||
if pk == pubkey {
|
||||
// Refresh active person data from storage
|
||||
GLOBALS.people.set_active_person(pubkey).await?;
|
||||
}
|
||||
}
|
||||
|
||||
self.pick_relays().await;
|
||||
|
||||
Ok(())
|
||||
|
@ -874,6 +874,10 @@ impl People {
|
||||
*self.active_person.blocking_read()
|
||||
}
|
||||
|
||||
pub async fn get_active_person_async(&self) -> Option<PublicKey> {
|
||||
*self.active_person.read().await
|
||||
}
|
||||
|
||||
pub fn get_active_person_write_relays(&self) -> Vec<(RelayUrl, u64)> {
|
||||
self.active_persons_write_relays.blocking_read().clone()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user