mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Per comment, simplify code in Setter
This commit is contained in:
parent
733326b329
commit
7a6edd0d86
1 changed files with 3 additions and 18 deletions
|
|
@ -57,29 +57,14 @@ namespace Wox.ViewModel
|
|||
if (!_portable.CanUpdatePortability())
|
||||
return;
|
||||
|
||||
bool switchToPortable;
|
||||
if(DataLocation.PortableDataLocationInUse())
|
||||
if (DataLocation.PortableDataLocationInUse())
|
||||
{
|
||||
switchToPortable = false;
|
||||
_portable.DisablePortableMode();
|
||||
}
|
||||
else
|
||||
{
|
||||
switchToPortable = true;
|
||||
_portable.EnablePortableMode();
|
||||
}
|
||||
|
||||
PortabilityUpdate(switchToPortable);
|
||||
}
|
||||
}
|
||||
|
||||
private void PortabilityUpdate(bool enablePortableMode)
|
||||
{
|
||||
if (enablePortableMode)
|
||||
{
|
||||
_portable.EnablePortableMode();
|
||||
}
|
||||
else
|
||||
{
|
||||
_portable.DisablePortableMode();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue