move logic to HistoryTable
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
@@ -33,9 +33,9 @@ public partial class HistoryViewModel : ActivatableViewModel
[AutoNotify] private HistoryItemViewModelBase? _selectedItem;
- [AutoNotify(SetterModifier = AccessModifier.Public)]
+ [AutoNotify(SetterModifier = AccessModifier.Private)]
private bool _isTransactionHistoryLoaded;
- [AutoNotify(SetterModifier = AccessModifier.Public)]
+ [AutoNotify(SetterModifier = AccessModifier.Private)]
private bool _isTransactionHistoryLoadedAndEmpty;
public HistoryViewModel(WalletViewModel walletViewModel, IObservable<Unit> updateTrigger)
@@ -222,12 +222,13 @@ public partial class HistoryViewModel : ActivatableViewModel
var rawHistoryList = await Task.Run(historyBuilder.BuildHistorySummary);
var orderedRawHistoryList = rawHistoryList.OrderBy(x => x.DateTime).ThenBy(x => x.Height).ThenBy(x => x.BlockIndex).ToList();
var newHistoryList = GenerateHistoryList(orderedRawHistoryList).ToArray();
-
_transactionSourceList.Edit(x =>
{
x.Clear();
x.AddRange(newHistoryList);
});
+ IsTransactionHistoryLoadedAndEmpty = _transactionSourceList.Count <= 0;
+ IsTransactionHistoryLoaded = true;
}
catch (Exception ex)
{

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
@@ -90,19 +90,12 @@ public partial class WalletViewModel : WalletViewModelBase
}
this.WhenAnyValue(x => x.History.IsTransactionHistoryLoaded, x => x.History.IsTransactionHistoryLoadedAndEmpty)
- .Subscribe(tuple =>
+ .Do(tuple =>
{
var (isTransactionHistoryLoaded, isTransactionHistoryLoadedAndEmpty) = tuple;
IsEmptyWallet = !isTransactionHistoryLoaded || isTransactionHistoryLoadedAndEmpty;
- });
-
- this.WhenAnyValue(x => x.IsSelected, x => x.IsWalletBalanceZero, x => x.History.UnfilteredTransactions.Count)
- .Subscribe(tuple =>
- {
- var (isSelected, isWalletBalanceZero, unfilteredTransactionCount) = tuple;
- History.IsTransactionHistoryLoadedAndEmpty = isSelected && isWalletBalanceZero && unfilteredTransactionCount <= 0;
- History.IsTransactionHistoryLoaded = History.IsTransactionHistoryLoadedAndEmpty || (isSelected && unfilteredTransactionCount > 0);
- });
+ })
+ .Subscribe();
_smallLayoutHeightBreakpoint = double.MaxValue;
_wideLayoutWidthBreakpoint = double.MaxValue;

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
<Panel IsVisible="{Binding !IsTransactionHistoryLoaded}">
<c:HistoryPlaceholderPanel Margin="{StaticResource HistoryTablePlaceholderPanelMargin}"
RowHeight="{StaticResource HistoryTableRowHeight}" />
- <Panel Background="{DynamicResource RegionColor}" Opacity="0.4" />
+ <Panel Background="{DynamicResource RegionColor}" Opacity="0.75" />
</Panel>
<Panel IsVisible="{Binding IsTransactionHistoryLoadedAndEmpty}"
Margin="{StaticResource HistoryTablePlaceholderPanelMargin}">
<c:HistoryPlaceholderPanel RowHeight="{StaticResource HistoryTableRowHeight}" />
- <Panel Background="{DynamicResource RegionColor}" Opacity="0.85" />
+ <Panel Background="{DynamicResource RegionColor}" Opacity="0.75" />
<Grid RowDefinitions="26,1*,1.5*">
<Panel Grid.Row="1">
<c:InfoMessage VerticalAlignment="Center"

move logic to HistoryTable