Improved MessageBus contract

This commit is contained in:
2dust
2024-10-11 10:17:44 +08:00
parent b172b03927
commit a0286ff810
8 changed files with 19 additions and 14 deletions

View File

@@ -41,7 +41,7 @@ namespace v2rayN.Desktop.Views
menuBackupAndRestore.Click += MenuBackupAndRestore_Click;
var IsAdministrator = Utils.IsAdministrator();
MessageBus.Current.Listen<string>(Global.CommandSendSnackMsg).Subscribe(x => DelegateSnackMsg(x));
MessageBus.Current.Listen<string>(EMsgCommand.SendSnackMsg.ToString()).Subscribe(x => DelegateSnackMsg(x));
ViewModel = new MainWindowViewModel(IsAdministrator, UpdateViewHandler);
Locator.CurrentMutable.RegisterLazySingleton(() => ViewModel, typeof(MainWindowViewModel));