diff --git a/WalletWasabi.Fluent/Behaviors/BindableFlyoutOpenBehavior.cs b/WalletWasabi.Fluent/Behaviors/BindableFlyoutOpenBehavior.cs deleted file mode 100644 index 9e0ea2f7893..00000000000 --- a/WalletWasabi.Fluent/Behaviors/BindableFlyoutOpenBehavior.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reactive.Disposables; -using System.Reactive.Linq; -using Avalonia; -using Avalonia.Controls; -using Avalonia.Controls.Primitives; -using ReactiveUI; -using WalletWasabi.Fluent.Helpers; - -namespace WalletWasabi.Fluent.Behaviors; - -public class BindableFlyoutOpenBehavior : AttachedToVisualTreeBehavior -{ - public static readonly StyledProperty IsOpenProperty = - AvaloniaProperty.Register(nameof(IsOpen)); - - public bool IsOpen - { - get => GetValue(IsOpenProperty); - set => SetValue(IsOpenProperty, value); - } - - protected override void OnAttachedToVisualTree(CompositeDisposable disposable) - { - if (AssociatedObject is { } target && - FlyoutBase.GetAttachedFlyout(target) is { } flyout) - { - Observable - .FromEventPattern(AssociatedObject, nameof(AssociatedObject.PointerEnter)) - .Subscribe(_ => IsOpen = true) - .DisposeWith(disposable); - - FlyoutHelpers.ShowFlyout(target, flyout, this.WhenAnyValue(x => x.IsOpen), disposable); - } - } -} diff --git a/WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacySuggestionsFlyoutViewModel.cs b/WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacySuggestionsFlyoutViewModel.cs index 398c038dc67..5f5fef2d888 100644 --- a/WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacySuggestionsFlyoutViewModel.cs +++ b/WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacySuggestionsFlyoutViewModel.cs @@ -16,7 +16,6 @@ public partial class PrivacySuggestionsFlyoutViewModel : ViewModelBase [AutoNotify] private PrivacySuggestion? _previewSuggestion; [AutoNotify] private PrivacySuggestion? _selectedSuggestion; - [AutoNotify] private bool _isOpen; [AutoNotify] private bool _isBusy; [AutoNotify] private bool _noPrivacy; @@ -26,15 +25,6 @@ public partial class PrivacySuggestionsFlyoutViewModel : ViewModelBase public PrivacySuggestionsFlyoutViewModel(Wallet wallet) { _privacySuggestionsModel = new PrivacySuggestionsModel(wallet); - - this.WhenAnyValue(x => x.IsOpen) - .Subscribe(x => - { - if (!x) - { - PreviewSuggestion = null; - } - }); } public ObservableCollection Warnings { get; } = new(); diff --git a/WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs b/WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs index a8ef45665a2..1f85c7d6d8d 100644 --- a/WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs +++ b/WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs @@ -30,7 +30,6 @@ public partial class TransactionPreviewViewModel : RoutableViewModel private readonly Stack<(BuildTransactionResult, TransactionInfo)> _undoHistory; private readonly Wallet _wallet; private readonly WalletViewModel _walletViewModel; - private readonly PrivacySuggestionsModel _privacySuggestionsModel; private TransactionInfo _info; private TransactionInfo _currentTransactionInfo; private CancellationTokenSource? _cancellationTokenSource; @@ -45,7 +44,6 @@ private TransactionPreviewViewModel(WalletViewModel walletViewModel, Transaction { _undoHistory = new(); _wallet = walletViewModel.Wallet; - _privacySuggestionsModel = new(_wallet); _walletViewModel = walletViewModel; _info = info; _currentTransactionInfo = info.Clone(); @@ -87,15 +85,6 @@ private TransactionPreviewViewModel(WalletViewModel walletViewModel, Transaction } }); - PrivacySuggestions.WhenAnyValue(x => x.IsOpen) - .Subscribe(x => - { - if (!x) - { - DisplayedTransactionSummary = CurrentTransactionSummary; - } - }); - this.WhenAnyValue(x => x.Transaction) .WhereNotNull() .Throttle(TimeSpan.FromMilliseconds(100)) diff --git a/WalletWasabi.Fluent/Views/Wallets/Send/TransactionPreviewView.axaml b/WalletWasabi.Fluent/Views/Wallets/Send/TransactionPreviewView.axaml index 58f1e50d3cf..270307249bb 100644 --- a/WalletWasabi.Fluent/Views/Wallets/Send/TransactionPreviewView.axaml +++ b/WalletWasabi.Fluent/Views/Wallets/Send/TransactionPreviewView.axaml @@ -79,11 +79,9 @@ - - +