mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Replace OnAlreadyDownloading with returning a bool from Download.
This commit is contained in:
@ -18,8 +18,6 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
|
||||
public readonly BindableBool Downloaded = new BindableBool();
|
||||
|
||||
public event Action OnAlreadyDownloading;
|
||||
|
||||
public BeatmapSetDownloader(BeatmapSetInfo set, bool noVideo = false)
|
||||
{
|
||||
this.set = set;
|
||||
@ -50,18 +48,16 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
public void Download()
|
||||
public bool Download()
|
||||
{
|
||||
if (Downloaded.Value)
|
||||
return;
|
||||
return false;
|
||||
|
||||
if (beatmaps.GetExistingDownload(set) != null)
|
||||
{
|
||||
OnAlreadyDownloading?.Invoke();
|
||||
return;
|
||||
}
|
||||
return false;
|
||||
|
||||
beatmaps.Download(set, noVideo);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void setAdded(BeatmapSetInfo s)
|
||||
|
Reference in New Issue
Block a user