Add extension methods to add extra safety to realm subscriptions

Also adjusts the naming and documentation to make it (hopefully) easier
to understand what this method/process implies.
This commit is contained in:
Dean Herbert
2021-12-01 15:09:51 +09:00
parent 7d0135063e
commit 4306420922
4 changed files with 111 additions and 6 deletions

View File

@ -8,7 +8,6 @@ using osu.Framework.Allocation;
using osu.Framework.Input.Bindings;
using osu.Game.Database;
using osu.Game.Rulesets;
using Realms;
namespace osu.Game.Input.Bindings
{
@ -56,7 +55,7 @@ namespace osu.Game.Input.Bindings
.Where(b => b.RulesetName == rulesetName && b.Variant == variant);
realmSubscription = realmKeyBindings
.SubscribeForNotifications((sender, changes, error) =>
.QueryAsyncWithNotifications((sender, changes, error) =>
{
// first subscription ignored as we are handling this in LoadComplete.
if (changes == null)