remove unused index subscription

This commit is contained in:
Kiril Videlov 2024-05-13 14:18:56 +02:00
parent b50ab35503
commit 62dadd96a8
No known key found for this signature in database
4 changed files with 1 additions and 20 deletions

View File

@ -1,11 +0,0 @@
import { listen } from '$lib/backend/ipc';
export function subscribe(
params: { projectId: string },
callback: (params: { projectId: string }) => Promise<void>
) {
return listen(
`project://${params.projectId}/git/index`,
async () => await callback({ ...params })
);
}

View File

@ -24,11 +24,6 @@ mod event {
impl From<Change> for ChangeForFrontend {
fn from(value: Change) -> Self {
match value {
Change::GitIndex(project_id) => ChangeForFrontend {
name: format!("project://{}/git/index", project_id),
payload: serde_json::json!({}),
project_id,
},
Change::GitFetch(project_id) => ChangeForFrontend {
name: format!("project://{}/git/fetch", project_id),
payload: serde_json::json!({}),

View File

@ -85,7 +85,6 @@ fn comma_separated_paths(paths: &[PathBuf]) -> String {
#[derive(Debug, Clone)]
#[allow(missing_docs)]
pub enum Change {
GitIndex(ProjectId),
GitFetch(ProjectId),
GitHead {
project_id: ProjectId,

View File

@ -60,6 +60,7 @@ impl Handler {
.await
.context("failed to handle git file change event"),
// This is only produced at the end of mutating Tauri commands to trigger a fresh state being served to the UI.
events::InternalEvent::CalculateVirtualBranches(project_id) => self
.calculate_virtual_branches(project_id)
.await
@ -175,9 +176,6 @@ impl Handler {
})?;
}
}
"index" => {
self.emit_app_event(Change::GitIndex(project.id))?;
}
_ => {}
}
}