Fix changes not being preserved

This commit is contained in:
2016-05-31 16:05:26 -04:00
parent c7dd9ccaa5
commit 9b8d0848d8
2 changed files with 10 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using FeedCenter.Properties;
namespace FeedCenter
{
@@ -78,7 +79,7 @@ namespace FeedCenter
_currentCategory = category;
// Get the current feed list to match the category
_feedList = _currentCategory?.Feeds.ToList() ?? _database.Feeds.ToList();
_feedList = _currentCategory == null ? _database.Feeds : _database.Feeds.Where(feed => feed.Category.ID == _currentCategory.ID);
// Reset the feed index
_feedIndex = -1;
@@ -92,6 +93,8 @@ namespace FeedCenter
// Update the display
DisplayCategory();
DisplayFeed();
Settings.Default.LastCategoryID = _currentCategory?.ID.ToString() ?? string.Empty;
}
}
}