mirror of
https://github.com/ppy/osu
synced 2024-12-24 15:53:37 +00:00
Remove unnecessary verification flow from score download tracking
This commit is contained in:
parent
617e6febb6
commit
692db9a9ec
@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -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);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user