Skip to content

Commit

Permalink
When scanning a person list, trigger possible metadata fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedilger committed Dec 13, 2023
1 parent 8e7e53b commit e24f2ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gossip-bin/src/ui/people/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,13 @@ fn refresh_list_data(app: &mut GossipUi, list: PersonList) {
if let Ok(Some(person)) = GLOBALS.storage.read_person(pk) {
people.push((person, *public));
} else {
let person = Person::new(pk.to_owned());
let person = Person::new(*pk);
let _ = GLOBALS.storage.write_person(&person, None);
people.push((person, *public));
}

// They are a person of interest (to as to fetch metadata if out of date)
GLOBALS.people.person_of_interest(*pk);
}
people.sort_by(|a, b| a.0.cmp(&b.0));
people
Expand Down

0 comments on commit e24f2ca

Please sign in to comment.