diff --git a/src/NewsReader/NewsReader.Applications/Controllers/FeedsController.cs b/src/NewsReader/NewsReader.Applications/Controllers/FeedsController.cs index 3cba0e37..de86d16b 100644 --- a/src/NewsReader/NewsReader.Applications/Controllers/FeedsController.cs +++ b/src/NewsReader/NewsReader.Applications/Controllers/FeedsController.cs @@ -185,7 +185,7 @@ private Task ShowFeedItemView(object? parameter) private Task EditFeed(object? parameter) { - var feed = (Feed)parameter!; + var feed = (Feed)(parameter ?? throw new InvalidOperationException("parameter of the edit command must not be null")); shellViewModel.SelectedFeed = feedViewModel.Value.Feed = feed; AddEditFeedViewModel.IsEditMode = true; AddEditFeedViewModel.FeedUrl = feed.Uri.ToString(); @@ -196,7 +196,7 @@ private Task EditFeed(object? parameter) private async Task RemoveFeed(object? parameter) { - var feed = (Feed)parameter!; + var feed = (Feed)(parameter ?? throw new InvalidOperationException("parameter of the remove command must not be null")); if (await messageService.ShowYesNoQuestion(Resources.RemoveFeedQuestion, feed.Name)) { FeedManager.Feeds.Remove(feed); diff --git a/src/NewsReader/NewsReader.Presentation/Views/AddEditFeedView.xaml b/src/NewsReader/NewsReader.Presentation/Views/AddEditFeedView.xaml index f47baa90..d85a17e7 100644 --- a/src/NewsReader/NewsReader.Presentation/Views/AddEditFeedView.xaml +++ b/src/NewsReader/NewsReader.Presentation/Views/AddEditFeedView.xaml @@ -10,10 +10,9 @@ - - - - + + + - + \ No newline at end of file diff --git a/src/NewsReader/NewsReader.Presentation/Views/FeedView.xaml b/src/NewsReader/NewsReader.Presentation/Views/FeedView.xaml index 95351a73..9f14adaa 100644 --- a/src/NewsReader/NewsReader.Presentation/Views/FeedView.xaml +++ b/src/NewsReader/NewsReader.Presentation/Views/FeedView.xaml @@ -13,20 +13,20 @@ - + - + - + - + @@ -38,9 +38,8 @@ - - - + + @@ -72,7 +71,7 @@ - + diff --git a/src/NewsReader/NewsReader.Presentation/Views/SettingsView.xaml b/src/NewsReader/NewsReader.Presentation/Views/SettingsView.xaml index 267b4e71..fc103958 100644 --- a/src/NewsReader/NewsReader.Presentation/Views/SettingsView.xaml +++ b/src/NewsReader/NewsReader.Presentation/Views/SettingsView.xaml @@ -10,15 +10,15 @@ - - + + - + @@ -26,8 +26,8 @@ - - + +