1
0
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:
naoey 2019-06-12 21:56:36 +05:30
parent 9cd5519da3
commit 7ba676ad31
No known key found for this signature in database
GPG Key ID: 670DA9BE3DF7EE60
3 changed files with 5 additions and 5 deletions

View File

@ -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 =>

View File

@ -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);
}

View File

@ -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);
};