mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-15 01:01:25 +10:00
fix(uninstalling): Re-enabled uninstalling apps
Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
@ -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 };
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user