emitlast event

download-throttled-events
FabianLars 2 years ago
parent dd8bc4ab39
commit e7d9efee37
No known key found for this signature in database
GPG Key ID: 838F329885A9C43D

@ -92,6 +92,18 @@ async fn download<R: Runtime>(
temp_progress = 0;
}
}
if i < 10 {
window
.emit(
"download://progress",
ProgressPayload {
id,
progress: temp_progress as u64,
total,
},
)
.unwrap(); // TODO: remove the unwrap again.
}
file.flush().await?;
Ok(id)

Loading…
Cancel
Save