mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-01-25 17:23:51 -05:00
Start adding Miniflux support plus other cleanup
- Modernize old async code - Update to .NET 10 - Adjust namespace - Bypass update check when debugging
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using ChrisKaczor.ApplicationUpdate;
|
||||
using ChrisKaczor.Wpf.Application;
|
||||
using FeedCenter.Feeds;
|
||||
using FeedCenter.Properties;
|
||||
using Serilog;
|
||||
using System;
|
||||
@@ -29,7 +30,6 @@ public partial class MainWindow : IDisposable
|
||||
public void Dispose()
|
||||
{
|
||||
_mainTimer?.Dispose();
|
||||
_feedReadWorker?.Dispose();
|
||||
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
@@ -66,12 +66,6 @@ public partial class MainWindow : IDisposable
|
||||
: Brushes.Black;
|
||||
HeaderLabel.Foreground = LinkTextList.Foreground;
|
||||
|
||||
// Create the background worker that does the actual reading
|
||||
_feedReadWorker = new BackgroundWorker { WorkerReportsProgress = true, WorkerSupportsCancellation = true };
|
||||
_feedReadWorker.DoWork += HandleFeedReadWorkerStart;
|
||||
_feedReadWorker.ProgressChanged += HandleFeedReadWorkerProgressChanged;
|
||||
_feedReadWorker.RunWorkerCompleted += HandleFeedReadWorkerCompleted;
|
||||
|
||||
// Set up the database
|
||||
_database = new FeedCenterEntities();
|
||||
|
||||
@@ -88,13 +82,16 @@ public partial class MainWindow : IDisposable
|
||||
// Initialize the feed display
|
||||
InitializeDisplay();
|
||||
|
||||
// Check for update
|
||||
if (Settings.Default.CheckVersionAtStartup)
|
||||
await UpdateCheck.CheckForUpdate(Settings.Default.IncludePrerelease);
|
||||
if (UpdateCheck.LocalVersion.Major > 0)
|
||||
{
|
||||
// Check for update
|
||||
if (Settings.Default.CheckVersionAtStartup)
|
||||
await UpdateCheck.CheckForUpdate(Settings.Default.IncludePrerelease);
|
||||
|
||||
// Show the link if updates are available
|
||||
if (UpdateCheck.UpdateAvailable)
|
||||
NewVersionLink.Visibility = Visibility.Visible;
|
||||
// Show the link if updates are available
|
||||
if (UpdateCheck.UpdateAvailable)
|
||||
NewVersionLink.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
Log.Logger.Information("MainForm creation finished");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user