mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Simplify IsOnlineScope
usage
This commit is contained in:
@ -32,6 +32,9 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
/// <typeparam name="TScoreInfo">The score model class.</typeparam>
|
/// <typeparam name="TScoreInfo">The score model class.</typeparam>
|
||||||
public abstract class Leaderboard<TScope, TScoreInfo> : CompositeDrawable
|
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; }
|
protected abstract bool IsOnlineScope { get; }
|
||||||
|
|
||||||
private const double fade_duration = 300;
|
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)
|
void localScoresChanged(IRealmCollection<ScoreInfo> sender, ChangeSet changes, Exception exception)
|
||||||
{
|
{
|
||||||
if (IsOnlineScope || cancellationToken.IsCancellationRequested)
|
if (cancellationToken.IsCancellationRequested)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var scores = sender.AsEnumerable();
|
var scores = sender.AsEnumerable();
|
||||||
|
Reference in New Issue
Block a user