mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 16:12:57 +08:00
Rename Info to Model
This commit is contained in:
parent
9cd5519da3
commit
7ba676ad31
@ -79,7 +79,7 @@ namespace osu.Game.Database
|
||||
/// <returns>Whether the <see cref="TModel"/> exists locally.</returns>
|
||||
public virtual bool IsAvailableLocally(TModel model) => modelStore.ConsumableItems.Any(m => m.Equals(model) && !m.DeletePending);
|
||||
|
||||
public ArchiveDownloadRequest<TModel> GetExistingDownload(TModel model) => currentDownloads.Find(r => r.Info.Equals(model));
|
||||
public ArchiveDownloadRequest<TModel> GetExistingDownload(TModel model) => currentDownloads.Find(r => r.Model.Equals(model));
|
||||
|
||||
private bool canDownload(TModel model) => GetExistingDownload(model) == null && api != null;
|
||||
|
||||
@ -87,7 +87,7 @@ namespace osu.Game.Database
|
||||
{
|
||||
DownloadNotification notification = new DownloadNotification
|
||||
{
|
||||
Text = $"Downloading {request.Info}",
|
||||
Text = $"Downloading {request.Model}",
|
||||
};
|
||||
|
||||
request.DownloadProgressed += progress =>
|
||||
|
@ -8,7 +8,7 @@ namespace osu.Game.Online.API
|
||||
public abstract class ArchiveDownloadRequest<TModel> : APIDownloadRequest
|
||||
where TModel : class
|
||||
{
|
||||
public readonly TModel Info;
|
||||
public readonly TModel Model;
|
||||
|
||||
public float Progress;
|
||||
|
||||
@ -16,7 +16,7 @@ namespace osu.Game.Online.API
|
||||
|
||||
protected ArchiveDownloadRequest(TModel model)
|
||||
{
|
||||
Info = model;
|
||||
Model = model;
|
||||
|
||||
Progressed += (current, total) => DownloadProgressed?.Invoke(Progress = (float)current / total);
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ namespace osu.Game.Overlays.Direct
|
||||
|
||||
beatmaps.DownloadBegan += download =>
|
||||
{
|
||||
if (download.Info.OnlineBeatmapSetID == BeatmapSet.Value?.OnlineBeatmapSetID)
|
||||
if (download.Model.OnlineBeatmapSetID == BeatmapSet.Value?.OnlineBeatmapSetID)
|
||||
attachDownload(download);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user