mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-01 14:04:57 +03:00
remove unused index subscription
This commit is contained in:
parent
b50ab35503
commit
62dadd96a8
@ -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 })
|
||||
);
|
||||
}
|
@ -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!({}),
|
||||
|
@ -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,
|
||||
|
@ -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))?;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user