mirror of
https://github.com/ppy/osu.git
synced 2025-02-17 19:12:57 +08:00
small fixes & docs fixes
This commit is contained in:
parent
5cc7ad4cf1
commit
f20e69b55c
osu.Game
Online/Leaderboards
Screens
OnlinePlay/Match/Components
Select/Leaderboards
@ -16,9 +16,6 @@ namespace osu.Game.Online.Leaderboards
|
||||
{
|
||||
public abstract partial class LeaderboardScoresProvider<TScope, TScoreInfo> : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The currently displayed scores.
|
||||
/// </summary>
|
||||
public IBindableList<TScoreInfo> Scores => scores;
|
||||
|
||||
public TScoreInfo? UserScore { get; private set; }
|
||||
@ -112,9 +109,9 @@ namespace osu.Game.Online.Leaderboards
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Call when a retrieval or display failure happened to show a relevant message to the user.
|
||||
/// Call when a retrieval of scores failed.
|
||||
/// </summary>
|
||||
/// <param name="state">The state to display.</param>
|
||||
/// <param name="state">The error state.</param>
|
||||
protected void SetErrorState(LeaderboardState state)
|
||||
{
|
||||
switch (state)
|
||||
@ -131,7 +128,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs a fetch/refresh of scores to be displayed.
|
||||
/// Performs a fetch/refresh of scores of the leaderboard.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns>An <see cref="APIRequest"/> responsible for the fetch operation. This will be queued and performed automatically.</returns>
|
||||
@ -160,9 +157,9 @@ namespace osu.Game.Online.Leaderboards
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Call when retrieved scores are ready to be displayed.
|
||||
/// Call when retrieved scores are ready to use by a leaderboard.
|
||||
/// </summary>
|
||||
/// <param name="scores">The scores to display.</param>
|
||||
/// <param name="scores">The scores to use.</param>
|
||||
/// <param name="userScore">The user top score, if any.</param>
|
||||
protected void SetScores(IEnumerable<TScoreInfo>? scores, TScoreInfo? userScore = default)
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ namespace osu.Game.Screens.OnlinePlay.Match.Components
|
||||
if (room.RoomID == null)
|
||||
return;
|
||||
|
||||
SetScores(null);
|
||||
PrepareScoresRetrieval();
|
||||
RefetchScores();
|
||||
}
|
||||
|
||||
|
@ -183,8 +183,6 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
|
||||
void localScoresChanged(IRealmCollection<ScoreInfo> sender, ChangeSet? changes)
|
||||
{
|
||||
SetState(LeaderboardState.Retrieving);
|
||||
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
return;
|
||||
|
||||
@ -193,6 +191,8 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
if (changes?.HasCollectionChanges() == false)
|
||||
return;
|
||||
|
||||
SetState(LeaderboardState.Retrieving);
|
||||
|
||||
var scores = sender.AsEnumerable();
|
||||
|
||||
if (filterMods && !mods.Value.Any())
|
||||
|
Loading…
Reference in New Issue
Block a user