Skip to content

Commit

Permalink
Update CurrencyConverterDialog.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
nlogozzo committed Sep 7, 2023
1 parent 95fd241 commit bb9005e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions NickvisionMoney.GNOME/Controls/CurrencyConverterDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ public async Task PresentAsync()
/// </summary>
private async Task OnAmountRowChangedAsync()
{
_sourceAmountRow.RemoveCssClass("error");
if (string.IsNullOrEmpty(_sourceAmountRow.GetText()))
{
_resultAmountRow.SetText("");
Expand All @@ -150,6 +151,11 @@ private async Task OnAmountRowChangedAsync()
_resultAmountRow.SetText(res.ResultAmount.ToAmountString(CultureInfo.CurrentCulture, _useNativeDigits, false));
}
}
else
{
_sourceAmountRow.AddCssClass("error");
_resultAmountRow.SetText("");
}
_loadingBox.SetVisible(false);
}
}
Expand Down

0 comments on commit bb9005e

Please sign in to comment.