Add setting to not show changelog on update

This commit is contained in:
Kurt 2021-05-20 15:03:15 -07:00
parent 7d27136bdc
commit aa55346bde
3 changed files with 10 additions and 3 deletions

View file

@ -259,7 +259,7 @@ namespace PKHeX.WinForms
showChangelog = false;
// Version Check
if (Settings.Startup.Version.Length > 0) // already run on system
if (Settings.Startup.Version.Length > 0 && Settings.Startup.ShowChangelogOnUpdate) // already run on system
{
bool parsed = Version.TryParse(Settings.Startup.Version, out var lastrev);
showChangelog = parsed && lastrev < CurrentProgramVersion;

View file

@ -118,6 +118,9 @@ namespace PKHeX.WinForms
[LocalizedDescription("Automatically Detect Save File on Program Startup")]
public AutoLoadSetting AutoLoadSaveOnStartup { get; set; } = AutoLoadSetting.RecentBackup;
[LocalizedDescription("Show the changelog when a new version of the program is run for the first time.")]
public bool ShowChangelogOnUpdate { get; set; } = true;
public List<string> RecentlyLoaded = new(MaxRecentCount);
// Don't let invalid values slip into the startup version.

View file

@ -229,8 +229,12 @@ namespace PKHeX.WinForms
public static void AddSaveFileExtensions(IEnumerable<string> exts)
{
// Only add new (unique) extensions
var newExtensions = exts.Distinct().Except(CustomSaveExtensions);
CustomSaveExtensions.AddRange(newExtensions);
var dest = CustomSaveExtensions;
foreach (var ext in exts)
{
if (!dest.Contains(ext))
dest.Add(ext);
}
}
private static readonly List<string> CustomSaveExtensions = new()