mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-01-14 01:25:38 -05:00
Some cleanup
This commit is contained in:
@@ -26,7 +26,7 @@ namespace FeedCenter
|
||||
var endPosition = commandLine.IndexOf(" ", startPosition, StringComparison.Ordinal);
|
||||
|
||||
// Extract the feed URL
|
||||
var feedUrl = commandLine.Substring(startPosition, endPosition - startPosition);
|
||||
var feedUrl = commandLine[startPosition..endPosition];
|
||||
|
||||
// Add the HTTP protocol by default
|
||||
feedUrl = "http://" + feedUrl;
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace FeedCenter
|
||||
}
|
||||
|
||||
// Read the feed for the first time
|
||||
var feedReadResult = feed.Read(_database);
|
||||
var feedReadResult = feed.Read();
|
||||
|
||||
// See if we read the feed okay
|
||||
if (feedReadResult == FeedReadResult.Success)
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace FeedCenter
|
||||
foreach (var feed in feedsToRead)
|
||||
{
|
||||
// Read the feed
|
||||
database.SaveChanges(() => feed.Read(database, workerInput.ForceRead));
|
||||
database.SaveChanges(() => feed.Read(workerInput.ForceRead));
|
||||
|
||||
// Increment progress
|
||||
currentProgress += 1;
|
||||
|
||||
@@ -131,9 +131,8 @@ namespace FeedCenter
|
||||
break;
|
||||
case Dock.Left:
|
||||
case Dock.Right:
|
||||
throw new NotSupportedException();
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(Settings.Default.ToolbarLocation));
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -153,8 +152,8 @@ namespace FeedCenter
|
||||
_database.Refresh();
|
||||
|
||||
_feedList = _currentCategory == null
|
||||
? _database.Feeds
|
||||
: _database.Feeds.Where(feed => feed.Category.Id == _currentCategory.Id);
|
||||
? _database.Feeds.ToList()
|
||||
: _database.Feeds.Where(feed => feed.Category.Id == _currentCategory.Id).ToList();
|
||||
|
||||
UpdateToolbarButtonState();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user