move flash cancel into the object
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItemViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryItemViewModel.cs
@@ -2,6 +2,8 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive;
+using System.Reactive.Linq;
+using System.Threading.Tasks;
using System.Windows.Input;
using NBitcoin;
using ReactiveUI;
@@ -13,7 +15,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
{
public partial class HistoryItemViewModel : ViewModelBase
{
- [AutoNotify] private bool _isSelected;
+ [AutoNotify] private bool _isFlashing;
[AutoNotify] private bool _isConfirmed;
[AutoNotify] private int _orderIndex;
[AutoNotify] private DateTimeOffset _date;
@@ -43,6 +45,14 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
FilteredLabel = transactionSummary.Label.Skip(1).ToList();
ShowDetailsCommand = ReactiveCommand.Create(() => RoutableViewModel.Navigate(NavigationTarget.DialogScreen).To(new TransactionDetailsViewModel(transactionSummary, walletViewModel.Wallet, updateTrigger)));
+
+ this.WhenAnyValue(x => x.IsFlashing)
+ .Where(x => x)
+ .Subscribe(async _ =>
+ {
+ await Task.Delay(1260);
+ IsFlashing = false;
+ });
}
public ICommand ShowDetailsCommand { get; }

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
@@ -62,17 +62,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
if (txnItem is { })
{
SelectedItem = txnItem;
- SelectedItem.IsSelected = true;
-
- RxApp.MainThreadScheduler.Schedule(async () =>
- {
- await Task.Delay(1260);
-
- if (SelectedItem is { } item)
- {
- item.IsSelected = false;
- }
- });
+ SelectedItem.IsFlashing = true;
}
}

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
<Rectangle Name="BackgroundRectangle"
Grid.RowSpan="2"
- Grid.ColumnSpan="2" x:CompileBindings="False" Classes.selectAnimation="{Binding IsSelected}" />
+ Grid.ColumnSpan="2" x:CompileBindings="False" Classes.selectAnimation="{Binding IsFlashing}" />
<Rectangle x:Name="InvalidVisualElement"
Grid.ColumnSpan="2"
Fill="{DynamicResource DataGridRowInvalidBrush}" />

move flash cancel into the object