Fix various cases of creating realm contexts from update thread when not necessary

This commit is contained in:
Dean Herbert
2022-01-21 01:34:20 +09:00
parent 0c9eb3ad61
commit a5d2047f05
7 changed files with 36 additions and 37 deletions

View File

@ -386,11 +386,11 @@ namespace osu.Game.Overlays.Settings.Sections.Input
private void updateStoreFromButton(KeyButton button)
{
using (var realm = realmFactory.CreateContext())
realmFactory.Run(realm =>
{
var binding = realm.Find<RealmKeyBinding>(((IHasGuidPrimaryKey)button.KeyBinding).ID);
realm.Write(() => binding.KeyCombinationString = button.KeyBinding.KeyCombinationString);
}
});
}
private void updateIsDefaultValue()