mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
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:
@ -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);
|
||||
|
Reference in New Issue
Block a user