Remove unnecessary verification flow from score download tracking

This commit is contained in:
Dean Herbert 2021-10-27 20:21:00 +09:00
parent 617e6febb6
commit 692db9a9ec
2 changed files with 1 additions and 31 deletions

View File

@ -52,15 +52,6 @@ namespace osu.Game.Online
} }
} }
/// <summary>
/// Checks that a database model matches the one expected to be downloaded.
/// </summary>
/// <example>
/// For online play, this could be used to check that the databased model matches the online beatmap.
/// </example>
/// <param name="databasedModel">The model in database.</param>
protected virtual bool VerifyDatabasedModel(BeatmapSetInfo databasedModel) => true; // TODO: do we still need this?
private void downloadBegan(ValueChangedEvent<WeakReference<ArchiveDownloadRequest<BeatmapSetInfo>>> weakRequest) private void downloadBegan(ValueChangedEvent<WeakReference<ArchiveDownloadRequest<BeatmapSetInfo>>> weakRequest)
{ {
if (weakRequest.NewValue.TryGetTarget(out var request)) if (weakRequest.NewValue.TryGetTarget(out var request))
@ -134,12 +125,6 @@ namespace osu.Game.Online
if (!checkEquality(item, TrackedItem)) if (!checkEquality(item, TrackedItem))
return; return;
if (!VerifyDatabasedModel(item))
{
UpdateState(DownloadState.NotDownloaded);
return;
}
UpdateState(DownloadState.LocallyAvailable); UpdateState(DownloadState.LocallyAvailable);
}); });
} }

View File

@ -52,15 +52,6 @@ namespace osu.Game.Online
} }
} }
/// <summary>
/// Checks that a database model matches the one expected to be downloaded.
/// </summary>
/// <example>
/// For online play, this could be used to check that the databased model matches the online beatmap.
/// </example>
/// <param name="databasedModel">The model in database.</param>
protected virtual bool VerifyDatabasedModel(ScoreInfo databasedModel) => true; // TODO: do we still need this?
private void downloadBegan(ValueChangedEvent<WeakReference<ArchiveDownloadRequest<ScoreInfo>>> weakRequest) private void downloadBegan(ValueChangedEvent<WeakReference<ArchiveDownloadRequest<ScoreInfo>>> weakRequest)
{ {
if (weakRequest.NewValue.TryGetTarget(out var request)) if (weakRequest.NewValue.TryGetTarget(out var request))
@ -134,13 +125,7 @@ namespace osu.Game.Online
if (!checkEquality(item, TrackedItem)) if (!checkEquality(item, TrackedItem))
return; return;
if (!VerifyDatabasedModel(item)) UpdateState(DownloadState.NotDownloaded);
{
UpdateState(DownloadState.NotDownloaded);
return;
}
UpdateState(DownloadState.LocallyAvailable);
}); });
} }
} }