Fix `BeatmapLeaderboard` refreshing on unrelated changes to a beatmap

This commit is contained in:
Dean Herbert 2022-03-08 14:43:14 +09:00
parent 2a55c5e02e
commit 622ec53130
1 changed files with 5 additions and 0 deletions

View File

@ -191,6 +191,11 @@ void localScoresChanged(IRealmCollection<ScoreInfo> sender, ChangeSet changes, E
if (cancellationToken.IsCancellationRequested)
return;
// This subscription may fire from changes to linked beatmaps, which we don't care about.
// It's currently not possible for a score to be modified after insertion, so we can safely ignore callbacks with only modifications.
if (changes?.HasCollectionChanges() == false)
return;
var scores = sender.AsEnumerable();
if (filterMods && !mods.Value.Any())