Skip to content

Commit

Permalink
The notification about the availability of new versions will only app…
Browse files Browse the repository at this point in the history
…ear once a week.
  • Loading branch information
xvitaly committed Aug 15, 2024
1 parent 221cc91 commit 9c07742
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
5 changes: 1 addition & 4 deletions src/mhed/FrmMhed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -836,10 +836,7 @@ private async Task CheckForUpdates()
{
MessageBox.Show(string.Format(AppStrings.AHE_NewVersionAvailable, Properties.Resources.AppName), Properties.Resources.AppName, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
Properties.Settings.Default.LastUpdateTime = DateTime.Now;
}
Properties.Settings.Default.LastUpdateTime = DateTime.Now;
}
catch (Exception Ex)
{
Expand Down
13 changes: 1 addition & 12 deletions src/mhed/FrmUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,6 @@ public FrmUpdate(string UA, string A, string U)
AppUpdateDir = U;
}

/// <summary>
/// Set time of last application update check.
/// </summary>
private void UpdateTimeSetApp()
{
Properties.Settings.Default.LastUpdateTime = DateTime.Now;
}

/// <summary>
/// Launch a program update checker in a separate thread, waits for the
/// result and returns a message if found.
Expand All @@ -93,8 +85,8 @@ private async Task CheckForUpdates()
{
UpdAppImg.Image = Properties.Resources.IconUpdateNotAvailable;
UpdAppStatus.Text = AppStrings.AHE_UpdateNotAvailable;
UpdateTimeSetApp();
}
Properties.Settings.Default.LastUpdateTime = DateTime.Now;
}
catch (Exception Ex)
{
Expand Down Expand Up @@ -138,9 +130,6 @@ private bool InstallBinaryUpdate(string UpdateURL)
// Checking hashes...
if (UpMan.CheckAppHash(FileManager.CalculateFileSHA512(UpdateFileName)))
{
// Setting last update check date...
UpdateTimeSetApp();

// Showing message about successful download...
MessageBox.Show(AppStrings.AHE_UpdateSuccessful, Properties.Resources.AppName, MessageBoxButtons.OK, MessageBoxIcon.Information);

Expand Down

0 comments on commit 9c07742

Please sign in to comment.