stop scanning via disposable.
MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/ShowQrCameraDialogViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/ShowQrCameraDialogViewModel.cs
@@ -26,12 +26,6 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs
SetupCancel(enableCancel: true, enableCancelOnEscape: true, enableCancelOnPressed: true);
}
- protected override void OnNavigatedFrom(bool isInHistory)
- {
- base.OnNavigatedFrom(isInHistory);
- RxApp.MainThreadScheduler.Schedule(async () => await _qrReader.StopScanningAsync());
- }
-
protected override void OnNavigatedTo(bool isInHistory, CompositeDisposable disposables)
{
base.OnNavigatedTo(isInHistory, disposables);
@@ -73,6 +67,11 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs
})
.DisposeWith(disposables);
+ disposables.Add(Disposable.Create(() =>
+ {
+ RxApp.MainThreadScheduler.Schedule(async () => await _qrReader.StopScanningAsync());
+ }));
+
RxApp.MainThreadScheduler.Schedule(async () => await _qrReader.StartScanningAsync());
}
}

stop scanning via disposable.