Skip to content

Commit

Permalink
Dont show error message on image url if the input field is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Yelo420 committed Jan 7, 2024
1 parent 4397c71 commit e4b8e18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion gamevault/UserControls/GameSettingsUserControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,8 @@ private async void LoadImageUrl(string url, string tag)
}
catch (Exception ex)
{
MainWindowViewModel.Instance.AppBarText = ex.Message;
if (url != string.Empty)
MainWindowViewModel.Instance.AppBarText = ex.Message;
}
}
private void FindImages_Click(object sender, MouseButtonEventArgs e)
Expand Down
3 changes: 2 additions & 1 deletion gamevault/UserControls/UserSettingsUserControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ private async void LoadImageUrl(string url, string tag)
}
catch (Exception ex)
{
MainWindowViewModel.Instance.AppBarText = ex.Message;
if (url != string.Empty)
MainWindowViewModel.Instance.AppBarText = ex.Message;
}
}
#region Generic Events
Expand Down

0 comments on commit e4b8e18

Please sign in to comment.