Skip to content

Commit

Permalink
remove obsolete logic (#11051)
Browse files Browse the repository at this point in the history
  • Loading branch information
soosr committed Jul 18, 2023
1 parent 3374354 commit eadfa55
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 59 deletions.
35 changes: 0 additions & 35 deletions WalletWasabi.Fluent/Behaviors/BindableFlyoutOpenBehavior.cs

This file was deleted.

Expand Up @@ -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;
Expand All @@ -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<PrivacyWarning> Warnings { get; } = new();
Expand Down
Expand Up @@ -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;
Expand All @@ -45,7 +44,6 @@ private TransactionPreviewViewModel(WalletViewModel walletViewModel, Transaction
{
_undoHistory = new();
_wallet = walletViewModel.Wallet;
_privacySuggestionsModel = new(_wallet);
_walletViewModel = walletViewModel;
_info = info;
_currentTransactionInfo = info.Clone();
Expand Down Expand Up @@ -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))
Expand Down
Expand Up @@ -79,11 +79,9 @@
</Border.Styles>
<Interaction.Behaviors>
<behaviors:ShowFlyoutOnPointerOverBehavior />
<behaviors:BindableFlyoutOpenBehavior IsOpen="{Binding PrivacySuggestions.IsOpen}" />
</Interaction.Behaviors>
<FlyoutBase.AttachedFlyout>
<Flyout Placement="Bottom" ShowMode="TransientWithDismissOnPointerMoveAway"
IsOpen="{Binding PrivacySuggestions.IsOpen, Mode=OneWayToSource}">
<Flyout Placement="Bottom" ShowMode="TransientWithDismissOnPointerMoveAway">
<Panel DataContext="{Binding PrivacySuggestions}" Margin="0 5 0 0">

<!-- Warnings -->
Expand Down

0 comments on commit eadfa55

Please sign in to comment.