Application ready before dependency injction
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user