Skip to content

Commit afb8f61

Browse files
committed
Fixed admin message not showing
1 parent 08fcf65 commit afb8f61

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

LiveWriterPluginManager/ViewModel/MainViewModel.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Windows;
1+
using System.Threading.Tasks;
2+
using System.Windows;
23
using GalaSoft.MvvmLight;
34
using GalaSoft.MvvmLight.Command;
45
using LiveWriterPluginManager.Helpers;
@@ -18,18 +19,20 @@ public RelayCommand LoadedCommand
1819
{
1920
get
2021
{
21-
return new RelayCommand(() =>
22+
return new RelayCommand(async () =>
2223
{
2324
if (!AppHelper.LiveWriterInstalled)
2425
{
25-
_messageService.ShowErrorAsync("It doesn't look like you have Live Writer installed, please go to http://openlivewriter.org to download and install it.");
26+
await _messageService.ShowErrorAsync("It doesn't look like you have Live Writer installed, please go to http://openlivewriter.org to download and install it.");
2627
Application.Current.Shutdown();
2728
return;
2829
}
2930

31+
await Task.Delay(500);
32+
3033
if (!AppHelper.IsRunningAsAdmin())
3134
{
32-
_messageService.ShowErrorAsync("In order for this app to add/remove plugins, it needs to run as Administrator, please restart the app with higher privileges");
35+
await _messageService.ShowErrorAsync("In order for this app to add/remove plugins, it needs to run as Administrator, please restart the app with higher privileges");
3336
}
3437

3538
AppHelper.CheckForUpdates();

0 commit comments

Comments
 (0)