Skip to content

Commit 7a6edd0

Browse files
committed
Per comment, simplify code in Setter
1 parent 733326b commit 7a6edd0

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

Wox/ViewModel/SettingWindowViewModel.cs

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,29 +57,14 @@ public bool PortableMode
5757
if (!_portable.CanUpdatePortability())
5858
return;
5959

60-
bool switchToPortable;
61-
if(DataLocation.PortableDataLocationInUse())
60+
if (DataLocation.PortableDataLocationInUse())
6261
{
63-
switchToPortable = false;
62+
_portable.DisablePortableMode();
6463
}
6564
else
6665
{
67-
switchToPortable = true;
66+
_portable.EnablePortableMode();
6867
}
69-
70-
PortabilityUpdate(switchToPortable);
71-
}
72-
}
73-
74-
private void PortabilityUpdate(bool enablePortableMode)
75-
{
76-
if (enablePortableMode)
77-
{
78-
_portable.EnablePortableMode();
79-
}
80-
else
81-
{
82-
_portable.DisablePortableMode();
8368
}
8469
}
8570

0 commit comments

Comments
 (0)