mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Use async flow for storing key binding changes to realm
This commit is contained in:
@ -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()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user