Info message when transaction history is empty
MODIFY
WalletWasabi.Fluent/Styles/Themes/Base.axaml
WalletWasabi.Fluent/Styles/Themes/Base.axaml
<system:Double x:Key="HistoryTableRowHeight">36.5</system:Double>
<system:Double x:Key="HistoryTablePlaceholderTextOpacity">0.5</system:Double>
<Thickness x:Key="HistoryTablePlaceholderPanelMargin">0 42 0 0</Thickness>
+ <RowDefinitions x:Key="HistoryTableEmptyInfoMessageGridRows">26,1*,1.5*</RowDefinitions>
</Styles.Resources>
</Styles>

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
@@ -33,8 +33,10 @@ public partial class HistoryViewModel : ActivatableViewModel
[AutoNotify] private HistoryItemViewModelBase? _selectedItem;
- [AutoNotify(SetterModifier = AccessModifier.Private)]
- private bool _isTransactionHistoryEmpty;
+ [AutoNotify(SetterModifier = AccessModifier.Public)]
+ private bool _isTransactionHistoryLoaded;
+ [AutoNotify(SetterModifier = AccessModifier.Public)]
+ private bool _isTransactionHistoryLoadedAndEmpty;
public HistoryViewModel(WalletViewModel walletViewModel, IObservable<Unit> updateTrigger)
{
@@ -44,9 +46,6 @@ public partial class HistoryViewModel : ActivatableViewModel
_transactions = new ObservableCollectionExtended<HistoryItemViewModelBase>();
_unfilteredTransactions = new ObservableCollectionExtended<HistoryItemViewModelBase>();
- this.WhenAnyValue(x => x.UnfilteredTransactions.Count)
- .Subscribe(x => IsTransactionHistoryEmpty = x <= 0);
-
_transactionSourceList
.Connect()
.ObserveOn(RxApp.MainThreadScheduler)

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
@@ -89,8 +89,20 @@ public partial class WalletViewModel : WalletViewModelBase
.DisposeWith(Disposables);
}
- this.WhenAnyValue(x => x.History.IsTransactionHistoryEmpty)
- .Subscribe(x => IsEmptyWallet = x);
+ this.WhenAnyValue(x => x.History.IsTransactionHistoryLoaded, x => x.History.IsTransactionHistoryLoadedAndEmpty)
+ .Subscribe(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);
+ });
_smallLayoutHeightBreakpoint = double.MaxValue;
_wideLayoutWidthBreakpoint = double.MaxValue;

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
</TreeDataGrid.Styles>
</TreeDataGrid>
- <Panel IsVisible="{Binding IsTransactionHistoryEmpty}">
+ <Panel IsVisible="{Binding !IsTransactionHistoryLoaded}">
<c:HistoryPlaceholderPanel Margin="{StaticResource HistoryTablePlaceholderPanelMargin}"
RowHeight="{StaticResource HistoryTableRowHeight}" />
<Panel Background="{DynamicResource RegionColor}" Opacity="0.4" />
</Panel>
+ <Panel IsVisible="{Binding IsTransactionHistoryLoadedAndEmpty}"
+ Margin="{StaticResource HistoryTablePlaceholderPanelMargin}">
+ <c:HistoryPlaceholderPanel RowHeight="{StaticResource HistoryTableRowHeight}" />
+ <Panel Background="{DynamicResource RegionColor}" Opacity="0.85" />
+ <Grid RowDefinitions="{StaticResource HistoryTableEmptyInfoMessageGridRows}">
+ <Panel Grid.Row="1">
+ <c:InfoMessage VerticalAlignment="Center"
+ HorizontalAlignment="Center">
+ <TextBlock Text="Transaction history is empty" />
+ </c:InfoMessage>
+ </Panel>
+ </Grid>
+ </Panel>
</Panel>
</UserControl>

Info message when transaction history is empty