mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 20:23:00 +08:00
Refactor migration to read the same as previous one
This commit is contained in:
parent
68db112882
commit
caf0fd0742
@ -1022,10 +1022,10 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
// Clear default bindings for the chat focus toggle,
|
// Clear default bindings for the chat focus toggle,
|
||||||
// as they would conflict with the newly-added leaderboard toggle.
|
// as they would conflict with the newly-added leaderboard toggle.
|
||||||
var newKeyBindings = migration.NewRealm.All<RealmKeyBinding>().ToList();
|
var keyBindings = migration.NewRealm.All<RealmKeyBinding>();
|
||||||
var toggleChatBind = newKeyBindings.FirstOrDefault(bind => bind.ActionInt == (int)GlobalAction.ToggleChatFocus);
|
|
||||||
|
|
||||||
if (toggleChatBind != default && toggleChatBind.KeyCombination.Keys.SequenceEqual(new[] { InputKey.Tab }))
|
var toggleChatBind = keyBindings.FirstOrDefault(bind => bind.ActionInt == (int)GlobalAction.ToggleChatFocus);
|
||||||
|
if (toggleChatBind != null && toggleChatBind.KeyCombination.Keys.SequenceEqual(new[] { InputKey.Tab }))
|
||||||
migration.NewRealm.Remove(toggleChatBind);
|
migration.NewRealm.Remove(toggleChatBind);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user