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:
parent
2423bbb776
commit
ee9e329db3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user