mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 06:52:53 +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;
|
if (bindTarget != null) bindTarget.IsBinding = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateStoreFromButton(KeyButton button)
|
private void updateStoreFromButton(KeyButton button) =>
|
||||||
{
|
realm.WriteAsync(r => r.Find<RealmKeyBinding>(button.KeyBinding.ID).KeyCombinationString = button.KeyBinding.KeyCombinationString);
|
||||||
realm.Run(r =>
|
|
||||||
{
|
|
||||||
var binding = r.Find<RealmKeyBinding>(((IHasGuidPrimaryKey)button.KeyBinding).ID);
|
|
||||||
r.Write(() => binding.KeyCombinationString = button.KeyBinding.KeyCombinationString);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateIsDefaultValue()
|
private void updateIsDefaultValue()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user