Enforce double type in the download progress path

Wasn't sure where to exactly put this, or whether to split it, but it's very small change to worry about, so I guess it's fine being here
This commit is contained in:
Salman Ahmed
2021-01-16 23:17:47 +03:00
parent 23c7afa573
commit adb2605d5d
3 changed files with 10 additions and 10 deletions

View File

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