clean up
Rust / build (macos-latest, stable) (push) Canceled after 0s
Rust / build (ubuntu-latest, stable) (push) Canceled after 0s
Rust / build (windows-latest, stable) (push) Canceled after 0s
Rust / build (macos-latest, stable) (pull_request) Canceled after 0s
Rust / build (ubuntu-latest, stable) (pull_request) Canceled after 0s
Rust / build (windows-latest, stable) (pull_request) Canceled after 0s

This commit is contained in:
2026-09-25 20:11:20 +07:00
parent 333989813e
commit 7a6877ab0b
4 changed files with 11 additions and 163 deletions
+10 -14
View File
@@ -1229,7 +1229,7 @@ impl Backend {
self.sync_progress = Some((0, 0));
cx.notify();
let progress_task: Task<Result<(), Error>> = cx.spawn(async move |this, cx| {
cx.spawn(async move |this, cx| {
let mut last_percent: u64 = 0;
while rx.changed().await.is_ok() {
@@ -1254,23 +1254,18 @@ impl Backend {
}
}
Ok(())
});
progress_task.detach();
Ok::<(), anyhow::Error>(())
})
.detach();
let sync = cx.background_spawn(async move {
let opts = SyncOptions::default().progress(tx);
sync_bootstrap_only(&client, filter, opts).await
});
let task: Task<Result<(), Error>> = cx.spawn(async move |this, cx| {
cx.spawn(async move |this, cx| {
match sync.await {
Ok(summary) => {
log::debug!(
"sync done: {} received, {} sent",
summary.received.len(),
summary.sent.len()
);
Ok(_) => {
this.update(cx, |this, cx| {
this.sync_progress = None;
cx.emit(BackendEvent::Synced);
@@ -1284,9 +1279,10 @@ impl Backend {
})?;
}
}
Ok(())
});
task.detach();
Ok::<(), anyhow::Error>(())
})
.detach();
}
/// Emit [`BackendEvent::Published`] for cross-store invalidation.
-2
View File
@@ -135,8 +135,6 @@ impl RepoListStore {
backend.update(cx, |backend, cx| {
backend.sync_bootstrap(filters::all_announcements(), cx);
// State events carry the last push time, so syncing them globally
// lets the list date every repository without the user opening it.
backend.sync_bootstrap(filters::all_states(), cx);
// Deletion requests, NIP-09/62, must be known before any announcement is shown.
backend.sync_bootstrap(filters::deletions(), cx);