fix(uninstalling): Re-enabled uninstalling apps

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2025-01-04 16:27:30 +11:00
parent dceaa56ade
commit a56ee25581
5 changed files with 71 additions and 92 deletions

View File

@ -169,9 +169,6 @@ impl DownloadManagerBuilder {
DownloadManagerSignal::Cancel(meta) => {
self.manage_cancel_signal(&meta);
}
DownloadManagerSignal::Uninstall(meta) => {
self.uninstall_application(&meta);
}
_ => {}
};
}
@ -321,14 +318,6 @@ impl DownloadManagerBuilder {
}
self.push_ui_queue_update();
}
fn uninstall_application(&mut self, meta: &DownloadableMetadata) {
let download_agent = match self.download_agent_registry.get(meta) {
Some(download_agent) => download_agent.clone(),
None => return,
};
self.manage_cancel_signal(meta);
download_agent.on_uninstall(&self.app_handle);
}
fn push_ui_stats_update(&self, kbs: usize, time: usize) {
let event_data = StatsUpdateEvent { speed: kbs, time };

View File

@ -17,5 +17,4 @@ pub trait Downloadable: Send + Sync {
fn on_complete(&self, app_handle: &AppHandle);
fn on_incomplete(&self, app_handle: &AppHandle);
fn on_cancelled(&self, app_handle: &AppHandle);
fn on_uninstall(&self, app_handle: &AppHandle);
}