emitlast event

This commit is contained in:
FabianLars
2023-10-31 13:28:31 +01:00
parent dd8bc4ab39
commit e7d9efee37
+12
View File
@@ -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)