Refactor if conditions
MODIFY
WalletWasabi.Fluent/Controls/LineChart.cs
WalletWasabi.Fluent/Controls/LineChart.cs
@@ -142,8 +142,11 @@ namespace WalletWasabi.Fluent.Controls
private void PointerReleasedHandler(object? sender, PointerReleasedEventArgs e)
{
- if (_captured)
+ if (!_captured)
{
+ return;
+ }
+
var position = e.GetPosition(this);
var cursorHitTestRect = GetXAxisCursorHitTestRect();
var cursorSizeWestEast = cursorHitTestRect != null && cursorHitTestRect.Value.Contains(position);
@@ -153,7 +156,6 @@ namespace WalletWasabi.Fluent.Controls
}
_captured = false;
}
- }
private void PointerPressedHandler(object? sender, PointerPressedEventArgs e)
{

Refactor if conditions