mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-01-14 01:25:38 -05:00
More modernization
- Split generic "common" libraries into specific libraries - Use other packages in lieu of custom code - General cleanup
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using FeedCenter.Options;
|
||||
using CKaczor.InstalledBrowsers;
|
||||
using FeedCenter.Options;
|
||||
using FeedCenter.Properties;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -26,9 +27,6 @@ namespace FeedCenter
|
||||
// Create a new list of feed items
|
||||
var feedItems = (from FeedItem feedItem in LinkTextList.Items select feedItem).ToList();
|
||||
|
||||
// Get the browser
|
||||
var browser = BrowserCommon.FindBrowser(Settings.Default.Browser);
|
||||
|
||||
// Cache the settings object
|
||||
var settings = Settings.Default;
|
||||
|
||||
@@ -39,7 +37,7 @@ namespace FeedCenter
|
||||
foreach (var feedItem in feedItems)
|
||||
{
|
||||
// Try to open the link
|
||||
if (BrowserCommon.OpenLink(browser, feedItem.Link))
|
||||
if (InstalledBrowser.OpenLink(Settings.Default.Browser, feedItem.Link))
|
||||
{
|
||||
// Mark the feed as read
|
||||
_database.SaveChanges(() => feedItem.BeenRead = true);
|
||||
@@ -236,9 +234,9 @@ namespace FeedCenter
|
||||
textWriter.Flush();
|
||||
textWriter.Close();
|
||||
|
||||
BrowserCommon.OpenLink(fileName);
|
||||
InstalledBrowser.OpenLink(Settings.Default.Browser, fileName);
|
||||
|
||||
MarkAllItemsAsRead();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user