move state types from signed_core into signed_state
This commit is contained in:
@@ -8,8 +8,7 @@ use nostr::event::IntoEventBuilder;
|
||||
use nostr_sdk::prelude::*;
|
||||
use settings::{EventFetchingStrategy, SettingsStore};
|
||||
use signed_core::{
|
||||
Announcement, Deletions, Filters, GitEvent, PullRequest, RepoAddr, RepoState, RepoStatus,
|
||||
filters,
|
||||
Announcement, Deletions, Filters, GitEvent, PullRequest, RepoAddr, RepoStatus, filters,
|
||||
};
|
||||
use signed_git::{Nip34Binding, Repo};
|
||||
|
||||
@@ -19,6 +18,7 @@ use crate::checkouts::CheckoutsStore;
|
||||
use crate::patch_series::{MAX_PATCH_EVENT_BYTES, PatchSeries};
|
||||
use crate::push::{PushOutcome, grasp_base_url, grasp06_prs_url, pr_clone_urls};
|
||||
use crate::repos::RepoListStore;
|
||||
use crate::state::{GitRef, SyncState};
|
||||
use crate::sync_status::SyncStatusStore;
|
||||
|
||||
pub struct RepoStore {
|
||||
@@ -34,7 +34,7 @@ pub struct RepoStore {
|
||||
pub loaded: bool,
|
||||
pub head: Option<String>,
|
||||
// Refs and timestamp of the latest state event, for sync detection.
|
||||
pub state_refs: Vec<(String, String)>,
|
||||
pub state_refs: Vec<GitRef>,
|
||||
pub state_at: Option<Timestamp>,
|
||||
pub issues: Vec<Event>,
|
||||
pub patches: Vec<Event>,
|
||||
@@ -354,7 +354,7 @@ impl RepoStore {
|
||||
|
||||
let all_states = states.into_iter().filter(|e| !deletions.is_deleted(e));
|
||||
let state =
|
||||
utils::latest(all_states).map(|event| (RepoState::parse(&event), event.created_at));
|
||||
utils::latest(all_states).map(|event| (SyncState::parse(&event), event.created_at));
|
||||
|
||||
let (mut issues, mut patches, mut pull_requests, mut statuses, mut comments) =
|
||||
(Vec::new(), Vec::new(), Vec::new(), Vec::new(), Vec::new());
|
||||
|
||||
Reference in New Issue
Block a user