mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-11 20:17:46 +00:00
fix: app nap ipc drop and implement delete modal
This commit is contained in:
@@ -367,6 +367,7 @@ pub struct DownloadProgressEvent {
|
||||
fraction: f64,
|
||||
speed: String,
|
||||
eta: String,
|
||||
size: Option<String>,
|
||||
}
|
||||
|
||||
fn collect_download_uris(url: &str, mirrors: Option<&str>) -> Vec<String> {
|
||||
@@ -790,12 +791,13 @@ pub(crate) async fn start_media_download_internal(
|
||||
.unwrap_or_else(|| "-".to_string());
|
||||
|
||||
let now = std::time::Instant::now();
|
||||
if now.duration_since(last_progress_at) >= std::time::Duration::from_millis(150) {
|
||||
if now.duration_since(last_progress_at) >= std::time::Duration::from_millis(1000) {
|
||||
let _ = app_handle.emit("download-progress", DownloadProgressEvent {
|
||||
id: id.to_string(),
|
||||
fraction: overall_fraction,
|
||||
speed,
|
||||
eta,
|
||||
size: None,
|
||||
});
|
||||
last_progress_at = now;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user