Skip the initial value change (which is false)
MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/DialogScreenViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/DialogScreenViewModel.cs
@@ -22,16 +22,16 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs
}
});
- this.WhenAnyValue(x => x.IsDialogOpen).Subscribe(x =>
+ this.WhenAnyValue(x => x.IsDialogOpen)
+ .Skip(1) // Skip the initial value change (which is false).
+ .DistinctUntilChanged()
+ .Subscribe(x =>
{
- if (!x)
- {
- if (!_isClosing)
+ if (!x && !_isClosing)
{
// Reset navigation when Dialog is using IScreen for navigation instead of the default IDialogHost.
Close();
}
- }
});
}

Skip the initial value change (which is false)