mirror of
https://github.com/ppy/osu
synced 2024-12-14 02:46:27 +00:00
Simplify IsOnlineScope
usage
This commit is contained in:
parent
daea13f491
commit
0293d95f82
@ -32,6 +32,9 @@ namespace osu.Game.Online.Leaderboards
|
||||
/// <typeparam name="TScoreInfo">The score model class.</typeparam>
|
||||
public abstract class Leaderboard<TScope, TScoreInfo> : CompositeDrawable
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether the current scope should refetch in response to changes in API connectivity state.
|
||||
/// </summary>
|
||||
protected abstract bool IsOnlineScope { get; }
|
||||
|
||||
private const double fade_duration = 300;
|
||||
|
@ -195,7 +195,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
|
||||
void localScoresChanged(IRealmCollection<ScoreInfo> sender, ChangeSet changes, Exception exception)
|
||||
{
|
||||
if (IsOnlineScope || cancellationToken.IsCancellationRequested)
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
return;
|
||||
|
||||
var scores = sender.AsEnumerable();
|
||||
|
Loading…
Reference in New Issue
Block a user