Fix OSX bug?
MODIFY
WalletWasabi.Gui/Program.cs
WalletWasabi.Gui/Program.cs
@@ -17,6 +17,11 @@ namespace WalletWasabi.Gui
#pragma warning restore IDE1006 // Naming Styles
{
StatusBarViewModel statusBar = null;
+ try
+ {
+ MainWindowViewModel.Instance = new MainWindowViewModel();
+ BuildAvaloniaApp().AfterSetup(async builder =>
+ {
try
{
Logger.SetFilePath(Path.Combine(Global.DataDir, "Logs.txt"));
@@ -35,10 +40,13 @@ namespace WalletWasabi.Gui
Global.Initialize(config);
statusBar = new StatusBarViewModel(Global.Nodes.ConnectedNodes, Global.MemPoolService, Global.IndexDownloader);
- MainWindowViewModel.Instance = new MainWindowViewModel(statusBar);
-
- BuildAvaloniaApp()
- .StartShellApp<AppBuilder, MainWindow>("Wasabi Wallet", new DefaultLayoutFactory(), () => MainWindowViewModel.Instance);
+ MainWindowViewModel.Instance.StatusBar = statusBar;
+ }
+ catch (Exception ex)
+ {
+ Logger.LogCritical<Program>(ex);
+ }
+ }).StartShellApp<AppBuilder, MainWindow>("Wasabi Wallet", new DefaultLayoutFactory(), () => MainWindowViewModel.Instance);
}
catch (Exception ex)
{

MODIFY
WalletWasabi.Gui/ViewModels/MainWindowViewModel.cs
WalletWasabi.Gui/ViewModels/MainWindowViewModel.cs
@@ -12,11 +12,16 @@ namespace WalletWasabi.Gui.ViewModels
private ModalDialogViewModelBase _modalDialog;
private bool _canClose = true;
- public StatusBarViewModel StatusBar { get; }
+ private StatusBarViewModel _statusBar;
- public MainWindowViewModel(StatusBarViewModel statusBar)
+ public StatusBarViewModel StatusBar
+ {
+ get { return _statusBar; }
+ internal set { this.RaiseAndSetIfChanged(ref _statusBar, value); }
+ }
+
+ public MainWindowViewModel()
{
- StatusBar = statusBar;
}
public static MainWindowViewModel Instance { get; internal set; }

Fix OSX bug?