1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-31 03:11:22 +08:00

Inhibit original callback from firing when sending initial changeset

This commit is contained in:
Dean Herbert
2024-07-09 16:05:58 +09:00
Unverified
parent 2423bbb776
commit ee9e329db3
2 changed files with 4 additions and 1 deletions
@@ -85,7 +85,7 @@ namespace osu.Game.Tests.Database
realm.Run(r => r.Refresh());
Assert.That(receivedChangesCount, Is.EqualTo(2));
Assert.That(receivedChangesCount, Is.EqualTo(1));
Assert.That(firstChanges, Is.Null);
registration.Dispose();
@@ -302,7 +302,10 @@ namespace osu.Game.Database
// Realm might coalesce the initial callback, meaning we never receive a `ChangeSet` of `null` marking the first callback.
// Let's decouple it for simplicity in handling.
if (changes != null)
{
callback(sender, null);
return;
}
}
callback(sender, changes);