Skip to content

Commit ed6757e

Browse files
committed
Display message that a restart of writer is required
1 parent dcdebfb commit ed6757e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

LiveWriterPluginManager/ViewModel/AddPluginViewModel.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@ public class AddPluginViewModel : ViewModelBase
2222
private readonly IZipService _zipService;
2323
private readonly IFileService _fileService;
2424
private readonly ILiveWriterService _liveWriterService;
25+
private readonly IMessageService _messageService;
2526

2627
/// <summary>
2728
/// Initializes a new instance of the MainViewModel class.
2829
/// </summary>
29-
public AddPluginViewModel(IZipService zipService, IFileService fileService, ILiveWriterService liveWriterService)
30+
public AddPluginViewModel(IZipService zipService, IFileService fileService, ILiveWriterService liveWriterService, IMessageService messageService)
3031
{
3132
_zipService = zipService;
3233
_fileService = fileService;
3334
_liveWriterService = liveWriterService;
35+
_messageService = messageService;
3436
CanAdd = AppHelper.LiveWriterInstalled && AppHelper.IsRunningAsAdmin();
3537
}
3638

@@ -56,6 +58,7 @@ public RelayCommand BrowseCommand
5658
if (!string.IsNullOrEmpty(plugin?.Path))
5759
{
5860
_liveWriterService.SavePlugin(plugin);
61+
await _messageService.ShowMessageAsync("Plugin has been installed, please restart Live Writer in order to start using it.");
5962
}
6063
}
6164
}

0 commit comments

Comments
 (0)