1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 23:12:56 +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
parent 2423bbb776
commit ee9e329db3
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View File

@ -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();

View File

@ -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);