mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-01-13 17:22:48 -05:00
More UI updates and cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user