Shutdown dialog improvements
MODIFY
WalletWasabi.Fluent/ViewModels/ApplicationViewModel.cs
WalletWasabi.Fluent/ViewModels/ApplicationViewModel.cs
@@ -63,6 +63,8 @@ public partial class ApplicationViewModel : ViewModelBase, ICanShutdownProvider
public bool CanShutdown()
{
+ return false;
+
var cjManager = Services.HostedServices.GetOrDefault<CoinJoinManager>();
if (cjManager is { })

MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/ShuttingDownViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/ShuttingDownViewModel.cs
+using ReactiveUI;
using System.Reactive;
using System.Reactive.Disposables;
using System.Reactive.Linq;
@@ -5,19 +6,24 @@ using WalletWasabi.Fluent.ViewModels.Dialogs.Base;
namespace WalletWasabi.Fluent.ViewModels.Dialogs;
-[NavigationMetaData(Title = "Wasabi is shutting down...")]
+[NavigationMetaData(Title = "Please wait to shut down...")]
public partial class ShuttingDownViewModel : DialogViewModelBase<Unit>
{
private readonly ApplicationViewModel _applicationViewModel;
+ private IDisposable? _intervalDisposable;
public ShuttingDownViewModel(ApplicationViewModel applicationViewModel)
{
_applicationViewModel = applicationViewModel;
+
+ NextCommand = ReactiveCommand.Create(OnNext);
}
protected override void OnNavigatedTo(bool isInHistory, CompositeDisposable disposables)
{
+ _intervalDisposable =
Observable.Interval(TimeSpan.FromSeconds(3))
+ .ObserveOn(RxApp.MainThreadScheduler)
.Subscribe(_ =>
{
if (_applicationViewModel.CanShutdown())
@@ -28,4 +34,10 @@ public partial class ShuttingDownViewModel : DialogViewModelBase<Unit>
})
.DisposeWith(disposables);
}
+
+ private void OnNext()
+ {
+ _intervalDisposable?.Dispose();
+ Close();
+ }
}

MODIFY
WalletWasabi.Fluent/Views/Dialogs/ShuttingdownDialogView.axaml
WalletWasabi.Fluent/Views/Dialogs/ShuttingdownDialogView.axaml
x:DataType="dialog:ShuttingDownViewModel"
x:CompileBindings="True"
x:Class="WalletWasabi.Fluent.Views.Dialogs.ShuttingDownView">
- <c:ContentArea Title="{Binding Title}"
- ScrollViewer.VerticalScrollBarVisibility="Disabled">
+ <c:ContentArea
+ ScrollViewer.VerticalScrollBarVisibility="Disabled"
+ NextContent="Ok" EnableNext="True">
+ <c:ContentArea.Title>
+ <TextBlock TextAlignment="Center" Text="{Binding Title}" />
+ </c:ContentArea.Title>
<DockPanel VerticalAlignment="Center">
- <TextBlock Text="This may take a few minutes."
+ <TextBlock Text="Wasabi is unable to close right now. Coinjoin in progress."
DockPanel.Dock="Bottom" TextAlignment="Center" TextWrapping="Wrap" MaxWidth="500" Margin="20 0" />
<Viewbox MaxHeight="100" Margin="40">
<c:ProgressRing IsIndeterminate="True" Height="100" Width="100" />

Shutdown dialog improvements