fix a few more warnings.
MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/HardwareWallet/ConnectHardwareWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/HardwareWallet/ConnectHardwareWalletViewModel.cs
@@ -219,6 +219,7 @@ public partial class ConnectHardwareWalletViewModel : RoutableViewModel
base.OnNavigatedTo(isInHistory, disposables);
var enableCancel = Services.WalletManager.HasWallet();
+
SetupCancel(enableCancel: enableCancel, enableCancelOnEscape: enableCancel, enableCancelOnPressed: false);
if (isInHistory)
@@ -228,12 +229,11 @@ public partial class ConnectHardwareWalletViewModel : RoutableViewModel
StartDetection();
- Disposable.Create(async () =>
+ disposables.Add(Disposable.Create(async () =>
{
CancelCts.Cancel();
await AbandonedTasks.WhenAllAsync();
CancelCts.Dispose();
- })
- .DisposeWith(disposables);
+ }));
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/HardwareWallet/DetectedHardwareWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/HardwareWallet/DetectedHardwareWalletViewModel.cs
@@ -81,11 +81,10 @@ public partial class DetectedHardwareWalletViewModel : RoutableViewModel
var enableCancel = Services.WalletManager.HasWallet();
SetupCancel(enableCancel: false, enableCancelOnEscape: enableCancel, enableCancelOnPressed: false);
- Disposable.Create(() =>
+ disposables.Add(Disposable.Create(() =>
{
CancelCts.Cancel();
CancelCts.Dispose();
- })
- .DisposeWith(disposables);
+ }));
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Login/PasswordFinder/SearchPasswordViewModel.cs
WalletWasabi.Fluent/ViewModels/Login/PasswordFinder/SearchPasswordViewModel.cs
@@ -42,12 +42,13 @@ public partial class SearchPasswordViewModel : RoutableViewModel
var t = Task.Run(() => FindPassword(Options, cancelToken.Token));
- Disposable.Create(async () =>
+ disposables.Add(Disposable.Create(async () =>
{
cancelToken.Cancel();
await t;
- })
- .DisposeWith(disposables);
+ }));
+
+ disposables.Add(cancelToken);
}
private void FindPassword(PasswordFinderOptions options, CancellationToken token)

MODIFY
WalletWasabi.Fluent/ViewModels/Settings/SettingsPageViewModel.cs
WalletWasabi.Fluent/ViewModels/Settings/SettingsPageViewModel.cs
@@ -51,7 +51,7 @@ public partial class SettingsPageViewModel : NavBarItemViewModel
SettingsTabViewModelBase.RestartNeeded += OnRestartNeeded;
- Disposable.Create(() => SettingsTabViewModelBase.RestartNeeded -= OnRestartNeeded)
- .DisposeWith(disposables);
+ disposables.Add(
+ Disposable.Create(() => SettingsTabViewModelBase.RestartNeeded -= OnRestartNeeded));
}
}

fix a few more warnings.