mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Improve state reset flow
This commit is contained in:
@ -120,9 +120,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
{
|
||||
if (value != PlaceholderState.Successful)
|
||||
{
|
||||
getScoresRequest?.Cancel();
|
||||
getScoresRequest = null;
|
||||
Scores = null;
|
||||
Reset();
|
||||
}
|
||||
|
||||
if (value == placeholderState)
|
||||
@ -166,7 +164,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
|
||||
protected Leaderboard()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
new GridContainer
|
||||
{
|
||||
@ -204,6 +202,13 @@ namespace osu.Game.Online.Leaderboards
|
||||
};
|
||||
}
|
||||
|
||||
protected virtual void Reset()
|
||||
{
|
||||
getScoresRequest?.Cancel();
|
||||
getScoresRequest = null;
|
||||
Scores = null;
|
||||
}
|
||||
|
||||
private IAPIProvider api;
|
||||
|
||||
private ScheduledDelegate pendingUpdateScores;
|
||||
|
Reference in New Issue
Block a user