More UI updates and cleanup

This commit is contained in:
2023-04-26 21:57:19 -04:00
parent edd01cc052
commit 7638d9c2c7
20 changed files with 225 additions and 273 deletions

View File

@@ -72,7 +72,7 @@ public partial class MainWindow
// If the category changed then reset the current feed to the first in the category
if (_currentCategory?.Id != category?.Id)
{
_currentFeed = category == null ? _database.Feeds.FirstOrDefault() : category.Feeds.FirstOrDefault();
_currentFeed = category == null ? _database.Feeds.FirstOrDefault() : _database.Feeds.FirstOrDefault(f => f.CategoryId == category.Id);
}
// Set the current category

View File

@@ -104,8 +104,6 @@ public partial class MainWindow : IDisposable
HandleCommandLine(commandLine);
}
#region Setting events
private void HandlePropertyChanged(object sender, PropertyChangedEventArgs e)
{
// Make sure we're on the right thread
@@ -147,10 +145,6 @@ public partial class MainWindow : IDisposable
}
}
#endregion
#region Database helpers
private void ResetDatabase()
{
// Get the ID of the current feed
@@ -191,10 +185,6 @@ public partial class MainWindow : IDisposable
: _feedList.OrderBy(feed => feed.Name).AsEnumerable().ElementAt(_feedIndex);
}
#endregion
#region Feed display
private void UpdateToolbarButtonState()
{
// Cache the feed count to save (a little) time
@@ -429,6 +419,4 @@ public partial class MainWindow : IDisposable
// Clear the list
LinkTextList.Items.Clear();
}
#endregion
}