Improve some if statements
MODIFY
WalletWasabi.Gui/Controls/NoparaPasswordBox.cs
WalletWasabi.Gui/Controls/NoparaPasswordBox.cs
@@ -247,36 +247,39 @@ namespace WalletWasabi.Gui.Controls
}
}
}
- else if (e.Key == Key.Back && Sb.Length > 0) // Backspace button -> delete from the end.
+ else if (Sb.Length > 0)
{
- if (SelectionLength != 0)
+ if (e.Key == Key.Back) // Backspace button -> delete from the end.
{
- Sb.Clear();
- }
- else
+ if (SelectionLength == 0)
{
if (CaretIndex == Text.Length)
{
Sb.Remove(Sb.Length - 1, 1);
}
}
- e.Handled = true;
- }
- else if (e.Key == Key.Delete && Sb.Length > 0) //Delete button -> delete from the beginning.
- {
- if (SelectionLength != 0)
+ else
{
Sb.Clear();
}
- else
+ e.Handled = true;
+ }
+ else if (e.Key == Key.Delete) //Delete button -> delete from the beginning.
+ {
+ if (SelectionLength == 0)
{
if (CaretIndex == 0)
{
Sb.Remove(0, 1);
}
}
+ else
+ {
+ Sb.Clear();
+ }
e.Handled = true;
}
+ }
else
{
if (SelectionLength != 0)

MODIFY
WalletWasabi/Services/WasabiSynchronizer.cs
WalletWasabi/Services/WasabiSynchronizer.cs
@@ -274,10 +274,6 @@ namespace WalletWasabi.Services
ignoreRequestInterval = true;
}
- else if (response.FiltersResponseState == FiltersResponseState.NoNewFilter)
- {
- // We are synced.
- }
LastResponse = response;
ResponseArrived?.Invoke(this, response);

Improve some if statements