Minor loading section added
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
@@ -51,6 +51,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
[AutoNotify] private string? _payJoinEndPoint;
[AutoNotify] private WriteableBitmap? _testImage;
[AutoNotify] private bool _isQrPanelVisible;
+ [AutoNotify] private bool _isCameraLoading;
private WebcamQrReader _qrReader;
private bool _parsingUrl;
@@ -62,12 +63,20 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
_transactionInfo = new TransactionInfo();
_labels = new ObservableCollection<string>();
_isQrPanelVisible = false;
+ _isCameraLoading = false;
_qrReader = new(_wallet.Network);
ExchangeRate = _wallet.Synchronizer.UsdExchangeRate;
PriorLabels = new();
Observable.FromEventPattern<WriteableBitmap>(_qrReader, nameof(_qrReader.NewImageArrived))
- .Subscribe(args => TestImage = args.EventArgs);
+ .Subscribe(args =>
+ {
+ if (IsCameraLoading == true)
+ {
+ IsCameraLoading = false;
+ }
+ TestImage = args.EventArgs;
+ });
Observable.FromEventPattern<string>(_qrReader, nameof(_qrReader.BitcoinAddressFound))
.Subscribe(async args =>
@@ -120,6 +129,10 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
AutoPasteCommand = ReactiveCommand.CreateFromTask(async () => await OnAutoPasteAsync());
QRCommand = ReactiveCommand.Create(() =>
{
+ if (IsQrPanelVisible == false)
+ {
+ IsCameraLoading = true;
+ }
IsQrPanelVisible = true;
_qrReader.StartScanning();
});

MODIFY
WalletWasabi.Fluent/Views/Wallets/Send/SendView.axaml
WalletWasabi.Fluent/Views/Wallets/Send/SendView.axaml
<!-- QR Camera -->
<DockPanel DockPanel.Dock="Top" Margin="0,0,0,6" IsVisible="{Binding IsQrPanelVisible}">
<Label DockPanel.Dock="Left" Content="_QR Camera:" Target="qrcamera" />
+ <Label DockPanel.Dock="Left" IsVisible="{Binding IsCameraLoading}" Content="_Loading camera..." Opacity="0.6"></Label>
<Image Source="{Binding TestImage}" Width="275" Height="275" Name="testImage" />
</DockPanel>
<!-- Amount -->

Minor loading section added