mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 02:43:19 +08:00
Simplify checking
This commit is contained in:
parent
e25b8bb298
commit
72bc7f8786
@ -172,13 +172,11 @@ namespace osu.Game.Configuration
|
|||||||
|
|
||||||
GetBindable<bool>(OsuConfig.SavePassword).ValueChanged += delegate
|
GetBindable<bool>(OsuConfig.SavePassword).ValueChanged += delegate
|
||||||
{
|
{
|
||||||
if (Get<bool>(OsuConfig.SavePassword) && !Get<bool>(OsuConfig.SaveUsername))
|
if (Get<bool>(OsuConfig.SavePassword)) Set(OsuConfig.SaveUsername, true);
|
||||||
Set(OsuConfig.SaveUsername, true);
|
|
||||||
};
|
};
|
||||||
GetBindable<bool>(OsuConfig.SaveUsername).ValueChanged += delegate
|
GetBindable<bool>(OsuConfig.SaveUsername).ValueChanged += delegate
|
||||||
{
|
{
|
||||||
if (!Get<bool>(OsuConfig.SaveUsername) && Get<bool>(OsuConfig.SavePassword))
|
if (!Get<bool>(OsuConfig.SaveUsername)) Set(OsuConfig.SavePassword, false);
|
||||||
Set(OsuConfig.SavePassword, false);
|
|
||||||
};
|
};
|
||||||
#pragma warning restore CS0612 // Type or member is obsolete
|
#pragma warning restore CS0612 // Type or member is obsolete
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user