use negentropy sync

This commit is contained in:
2026-08-05 10:08:01 +07:00
parent fdf74327bb
commit 2ec7d14c33
4 changed files with 151 additions and 10 deletions
+3 -1
View File
@@ -31,6 +31,7 @@ impl RepoListStore {
event.kind == Kind::GitRepoAnnouncement
&& this.author.is_none_or(|a| a == event.pubkey)
}
BackendEvent::Synced => true,
_ => false,
};
@@ -60,6 +61,7 @@ impl RepoListStore {
self.refresh(cx);
}
/// Negentropy-sync announcements with the bootstrap relays.
fn subscribe_remote(&mut self, cx: &mut Context<Self>) {
let backend = Backend::global(cx);
let author = self.author;
@@ -69,7 +71,7 @@ impl RepoListStore {
Some(a) => filters::announcements_by(a),
None => filters::all_announcements(500),
};
backend.subscribe(filter, cx);
backend.sync_bootstrap(filter, cx);
});
}