Skip to content

Commit 680419f

Browse files
committed
Code quality
1 parent 6843fe0 commit 680419f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
2525
private readonly Portable _portable;
2626
private readonly Internationalization _translater;
2727

28-
private static readonly bool _isAdministrator = Win32Helper.IsAdministrator();
29-
3028
public SettingsPaneGeneralViewModel(Settings settings, Updater updater, Portable portable, Internationalization translater)
3129
{
3230
Settings = settings;
@@ -150,7 +148,7 @@ private async Task CheckAdminChangeAndAskForRestartAsync()
150148
{
151149
// When we change from non-admin to admin, we need to restart the app as administrator to apply the changes
152150
// Under non-administrator, we cannot delete or set the logon task which is run as administrator
153-
if (AlwaysRunAsAdministrator && !_isAdministrator)
151+
if (AlwaysRunAsAdministrator && !Win32Helper.IsAdministrator())
154152
{
155153
if (App.API.ShowMsgBox(
156154
App.API.GetTranslation("runAsAdministratorChangeAndRestart"),

0 commit comments

Comments
 (0)