Application ready before dependency injction

This commit is contained in:
2022-08-23 23:31:45 +02:00
parent d3b7ff17be
commit 2b42691434
15 changed files with 234 additions and 78 deletions

View File

@ -25,6 +25,8 @@ namespace YouTubeViewers.WPF.Commands
public override async Task ExecuteAsync(object? parameter)
{
_youTubeViewersListingItemViewModel.ErrorMessage = null;
_youTubeViewersListingItemViewModel.IsDeleting = true;
YouTubeViewer youTubeViewer = _youTubeViewersListingItemViewModel.YouTubeViewer;
try
{
@ -32,7 +34,11 @@ namespace YouTubeViewers.WPF.Commands
}
catch (Exception)
{
throw;
_youTubeViewersListingItemViewModel.ErrorMessage = "Failed to delete YouTube viewer. Please try again later.";
}
finally
{
_youTubeViewersListingItemViewModel.IsDeleting = false;
}
}
}