Skip to content

Commit

Permalink
Check that will replace the old feed address from config files
Browse files Browse the repository at this point in the history
  • Loading branch information
maforget committed Feb 5, 2024
1 parent 4bb5554 commit c1828f1
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion ComicRack/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ public bool PreFilterMessage(ref Message m)

public const string DefaultNewsFeed = "https://github.com/maforget/ComicRackCE/commits.atom";

public const string DefaultUserForm = "https://github.com/maforget/ComicRackCE/discussions";
public const string OldDefaultNewsFeed = "http://feeds.feedburner.com/ComicRackNews";

public const string DefaultUserForm = "https://github.com/maforget/ComicRackCE/discussions";

public const string DefaultLocalizePage = "https://web.archive.org/web/20170528182733/http://comicrack.cyolito.com/faqs/12-how-to-create-language-packs";

Expand Down Expand Up @@ -871,6 +873,17 @@ private static void StartNew(string[] args)
{
News.Subscriptions.Add(new NewsStorage.Subscription(DefaultNewsFeed, "ComicRack News"));
}
else
{
//Because the default NewsFeeds.xml in the Data already as the old url inside it
var oldSub = News.Subscriptions.FirstOrDefault(x => x.Url == OldDefaultNewsFeed);
if (oldSub != null)
{
//Since the feeds doesn't match with the default url, we remove it, and add or new one.
News.Subscriptions.Remove(oldSub);
News.Subscriptions.Add(new NewsStorage.Subscription(DefaultNewsFeed, "ComicRack News"));
}
}
StartupProgress(TR.Messages["CreateMainWindow", "Creating Main Window"], 50);
if (ExtendedSettings.DisableScriptOptimization)
{
Expand Down

0 comments on commit c1828f1

Please sign in to comment.