mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:42:56 +08:00
Use async flow for storing key binding changes to realm
This commit is contained in:
parent
7342fb7f51
commit
6f6290a21a
@ -387,14 +387,8 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
if (bindTarget != null) bindTarget.IsBinding = true;
|
||||
}
|
||||
|
||||
private void updateStoreFromButton(KeyButton button)
|
||||
{
|
||||
realm.Run(r =>
|
||||
{
|
||||
var binding = r.Find<RealmKeyBinding>(((IHasGuidPrimaryKey)button.KeyBinding).ID);
|
||||
r.Write(() => binding.KeyCombinationString = button.KeyBinding.KeyCombinationString);
|
||||
});
|
||||
}
|
||||
private void updateStoreFromButton(KeyButton button) =>
|
||||
realm.WriteAsync(r => r.Find<RealmKeyBinding>(button.KeyBinding.ID).KeyCombinationString = button.KeyBinding.KeyCombinationString);
|
||||
|
||||
private void updateIsDefaultValue()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user