mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:33:21 +08:00
User property instead of method
This commit is contained in:
parent
842417cf42
commit
e76b3e2b40
@ -194,7 +194,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
|
|
||||||
private APIRequest getScoresRequest;
|
private APIRequest getScoresRequest;
|
||||||
|
|
||||||
protected abstract bool IsOnlineScope();
|
protected abstract bool IsOnlineScope { get; }
|
||||||
|
|
||||||
public void APIStateChanged(IAPIProvider api, APIState state)
|
public void APIStateChanged(IAPIProvider api, APIState state)
|
||||||
{
|
{
|
||||||
@ -202,7 +202,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
{
|
{
|
||||||
case APIState.Online:
|
case APIState.Online:
|
||||||
case APIState.Offline:
|
case APIState.Offline:
|
||||||
if (IsOnlineScope())
|
if (IsOnlineScope)
|
||||||
UpdateScores();
|
UpdateScores();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -33,7 +33,7 @@ namespace osu.Game.Screens.Multi.Match.Components
|
|||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool IsOnlineScope() => true;
|
protected override bool IsOnlineScope => true;
|
||||||
|
|
||||||
protected override APIRequest FetchScores(Action<IEnumerable<APIRoomScoreInfo>> scoresCallback)
|
protected override APIRequest FetchScores(Action<IEnumerable<APIRoomScoreInfo>> scoresCallback)
|
||||||
{
|
{
|
||||||
|
@ -79,7 +79,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool IsOnlineScope() => Scope != BeatmapLeaderboardScope.Local;
|
protected override bool IsOnlineScope => Scope != BeatmapLeaderboardScope.Local;
|
||||||
|
|
||||||
protected override APIRequest FetchScores(Action<IEnumerable<ScoreInfo>> scoresCallback)
|
protected override APIRequest FetchScores(Action<IEnumerable<ScoreInfo>> scoresCallback)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user