Enforce float type in the download progress path instead

This commit is contained in:
Salman Ahmed
2021-01-17 21:16:45 +03:00
parent 172552d551
commit d93a853dfd
6 changed files with 17 additions and 17 deletions

View File

@ -12,16 +12,16 @@ namespace osu.Game.Online.API
public double Progress { get; private set; }
public event Action<double> DownloadProgressed;
public event Action<float> DownloadProgressed;
protected ArchiveDownloadRequest(TModel model)
{
Model = model;
Progressed += (current, total) => SetProgress((double)current / total);
Progressed += (current, total) => SetProgress((float)current / total);
}
protected void SetProgress(double progress)
protected void SetProgress(float progress)
{
Progress = progress;
DownloadProgressed?.Invoke(progress);