clean out stuff
MODIFY
WalletWasabi.Fluent/ApplicationStateManager.cs
WalletWasabi.Fluent/ApplicationStateManager.cs
@@ -50,6 +50,7 @@ public class ApplicationStateManager : IMainWindowService
.SubstateOf(State.InitialState)
.OnEntry(() =>
{
+ _lifetime.MainWindow.Close();
_lifetime.MainWindow = null;
ApplicationViewModel.IsMainWindowShown = false;
})
@@ -60,7 +61,6 @@ public class ApplicationStateManager : IMainWindowService
_stateMachine.Configure(State.Open)
.SubstateOf(State.InitialState)
.OnEntry(CreateAndShowMainWindow)
- .OnTrigger(Trigger.Hide, () => _lifetime.MainWindow.Close())
.Permit(Trigger.Hide, State.Closed)
.Permit(Trigger.MainWindowClosed, State.Closed);

MODIFY
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
@@ -73,23 +73,7 @@ public partial class MainViewModel : ViewModelBase
this.WhenAnyValue(x => x.WindowState)
.ObserveOn(RxApp.MainThreadScheduler)
- .Subscribe(state =>
- {
- Services.UiConfig.WindowState = state.ToString();
-
- switch (state)
- {
- case WindowState.Normal:
- case WindowState.Maximized:
- case WindowState.FullScreen:
- if (Application.Current?.DataContext is ApplicationViewModel avm)
- {
- avm.IsMainWindowShown = true;
- }
-
- break;
- }
- });
+ .Subscribe(state => Services.UiConfig.WindowState = state.ToString());
this.WhenAnyValue(
x => x.DialogScreen!.IsDialogOpen,

clean out stuff