BUG-2529: This should most likely fix the excessive update checks, with a loss of potential good checks.

This commit is contained in:
Robin Krom 2020-02-10 22:57:15 +01:00
commit b21c114c1f

View file

@ -79,7 +79,12 @@ namespace Greenshot.Experimental {
// Test like this: // Test like this:
// currentVersion = new Version("0.8.1.1198"); // currentVersion = new Version("0.8.1.1198");
try { // Make sure we update the LastUpdateCheck, in case an error occurs we should not retry every 5 minutes
// This actually prevents an update check, but rather one to less than many to many
CoreConfig.LastUpdateCheck = DateTime.Now;
try
{
_latestGreenshot = null; _latestGreenshot = null;
ProcessRssInfo(currentVersion); ProcessRssInfo(currentVersion);
if (_latestGreenshot != null) { if (_latestGreenshot != null) {
@ -87,7 +92,6 @@ namespace Greenshot.Experimental {
MainForm.Instance.NotifyIcon.BalloonTipClosed += CleanupBalloonTipClick; MainForm.Instance.NotifyIcon.BalloonTipClosed += CleanupBalloonTipClick;
MainForm.Instance.NotifyIcon.ShowBalloonTip(10000, "Greenshot", Language.GetFormattedString(LangKey.update_found, "'" + _latestGreenshot.File + "'"), ToolTipIcon.Info); MainForm.Instance.NotifyIcon.ShowBalloonTip(10000, "Greenshot", Language.GetFormattedString(LangKey.update_found, "'" + _latestGreenshot.File + "'"), ToolTipIcon.Info);
} }
CoreConfig.LastUpdateCheck = DateTime.Now;
} catch (Exception e) { } catch (Exception e) {
Log.Error("An error occured while checking for updates, the error will be ignored: ", e); Log.Error("An error occured while checking for updates, the error will be ignored: ", e);
} }