mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-15 17:21:19 +10:00
feat(download manager): only allow downloads for supported platforms
This commit is contained in:
@ -37,6 +37,8 @@ pub enum DownloadManagerSignal {
|
||||
Error(GameDownloadError),
|
||||
/// Pushes UI update
|
||||
Update,
|
||||
/// Causes the Download Agent status to be synced to disk
|
||||
Sync(usize),
|
||||
}
|
||||
pub enum DownloadManagerStatus {
|
||||
Downloading,
|
||||
|
||||
@ -141,6 +141,8 @@ impl DownloadManagerBuilder {
|
||||
self.app_handle.emit("update_queue", event_data).unwrap();
|
||||
}
|
||||
|
||||
fn sync_download_agent(&self) {}
|
||||
|
||||
fn remove_and_cleanup_game(&mut self, game_id: &String) -> Arc<GameDownloadAgent> {
|
||||
self.download_queue.pop_front();
|
||||
let download_agent = self.download_agent_registry.remove(game_id).unwrap();
|
||||
@ -195,6 +197,9 @@ impl DownloadManagerBuilder {
|
||||
DownloadManagerSignal::Update => {
|
||||
self.push_manager_update();
|
||||
}
|
||||
DownloadManagerSignal::Sync(index) => {
|
||||
self.sync_download_agent();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user