fix: date repository cards from state events, not announcements

The explore list fell back to the announcement created_at because kind 30618 state events were only fetched per repository, on open. Sync them globally and refresh the list on published state events, so a card shows the last push without the user cloning first.

Open repository panels now also react to state events from relays and to locally published state events.
This commit is contained in:
2026-09-25 17:36:35 +07:00
parent 1d44338037
commit 42c1229a90
4 changed files with 39 additions and 17 deletions
+5
View File
@@ -184,6 +184,11 @@ pub fn all_announcements() -> Filter {
Filter::new().kind(Kind::GitRepoAnnouncement)
}
/// All repository state events, carrying each repository's refs and last push time.
pub fn all_states() -> Filter {
Filter::new().kind(Kind::RepoState)
}
/// How far back deletion requests are fetched and stored.
const DELETIONS_LOOKBACK: Duration = Duration::from_secs(3 * 365 * 86_400);