Skip to content

Commit

Permalink
feat: add release notes link
Browse files Browse the repository at this point in the history
closes #348
  • Loading branch information
DorielRivalet committed Jun 12, 2024
1 parent ab3c4b5 commit 3934e15
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions MHFZ_Overlay/Services/DatabaseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ namespace MHFZ_Overlay.Services;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Media.Imaging;
using System.Windows.Threading;
using CommunityToolkit.Mvvm.Messaging;
using EZlion.Mapper;
using MHFZ_Overlay;
Expand Down Expand Up @@ -16820,7 +16821,7 @@ private void CheckDatabaseVersion(SQLiteConnection connection, DataLoader dataLo
var currentUserVersion = this.GetUserVersion(connection);

// this will always run the next time the user runs the program after a fresh install. So it always runs at least once.
if (Program.IsVelopackUpdating == false && ((Program.CurrentProgramVersion != null && Program.CurrentProgramVersion.Trim() != previousVersion.Trim()) || currentUserVersion == 0))
if (true == true || Program.IsVelopackUpdating == false && ((Program.CurrentProgramVersion != null && Program.CurrentProgramVersion.Trim() != previousVersion.Trim()) || currentUserVersion == 0))
{
Logger.Info(CultureInfo.InvariantCulture, "Found different program version or userVersion 0. Current: {0}, Previous: {1}, userVersion: {2}", Program.CurrentProgramVersion, previousVersion, currentUserVersion);

Expand All @@ -16829,10 +16830,17 @@ private void CheckDatabaseVersion(SQLiteConnection connection, DataLoader dataLo

Do you want to perform the necessary database updates? A backup of your current MHFZ_Overlay.sqlite file will be done if you accept.

Updating the database structure may take some time, it will transport all of your current data straight to the latest database structure, regardless of the previous database version.",
Updating the database structure may take some time, it will transport all of your current data straight to the latest database structure, regardless of the previous database version.

Release notes: https://wycademy.vercel.app/overlay/release-notes (clicking yes will open the browser with the mentioned link)",
string.Format(CultureInfo.InvariantCulture, "MHF-Z Overlay Database Update ({0} to {1})", previousVersion, Program.CurrentProgramVersion), MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No);
if (result == MessageBoxResult.Yes)
{
System.Diagnostics.Process.Start(new ProcessStartInfo
{
FileName = "https://wycademy.vercel.app/overlay/release-notes",
UseShellExecute = true
});
this.UpdateDatabaseSchema(connection, dataLoader, currentUserVersion);
}
else
Expand Down

0 comments on commit 3934e15

Please sign in to comment.