mirror of https://github.com/ppy/osu
Refactor migration to read the same as previous one
This commit is contained in:
parent
68db112882
commit
caf0fd0742
|
@ -1022,10 +1022,10 @@ void convertOnlineIDs<T>() where T : RealmObject
|
|||
{
|
||||
// Clear default bindings for the chat focus toggle,
|
||||
// as they would conflict with the newly-added leaderboard toggle.
|
||||
var newKeyBindings = migration.NewRealm.All<RealmKeyBinding>().ToList();
|
||||
var toggleChatBind = newKeyBindings.FirstOrDefault(bind => bind.ActionInt == (int)GlobalAction.ToggleChatFocus);
|
||||
var keyBindings = migration.NewRealm.All<RealmKeyBinding>();
|
||||
|
||||
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);
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue