Improve Clear Cache Data

- Improves clear cache data by ensuring the app automatically reloads/reprompts the scan window
This commit is contained in:
Frog
2026-07-24 02:22:49 -07:00
parent 804170ca7d
commit a4b6afa214
3 changed files with 15 additions and 1 deletions
+11 -1
View File
@@ -1660,7 +1660,17 @@ internal sealed partial class MainForm : CustomForm
private void programsGroupBox_Enter(object sender, EventArgs e) { }
private void OnSettingsButtonClick(object sender, EventArgs e)
=> SettingsForm.Show(this);
{
SettingsForm.Show(this);
if (ProgramData.CacheCleared)
{
ProgramData.CacheCleared = false;
selectionTreeView.Nodes.Clear();
Selection.All.Clear();
programsToScan = null;
OnLoad(forceProvideChoices: true);
}
}
protected override void OnShown(EventArgs e)
{
+2
View File
@@ -89,7 +89,9 @@ internal sealed partial class SettingsForm : CustomForm
}
}
ProgramData.CacheCleared = true;
ProgramData.SaveSettings(Program.AppSettings);
DialogResult = DialogResult.OK;
}
private async void OnReconfigureSteamCMDClick(object sender, EventArgs e)
+2
View File
@@ -81,6 +81,8 @@ internal static class ProgramData
private static readonly string InstalledGamesPath = CachePath + @"\installed.json";
private static readonly string SettingsPath = CachePath + @"\settings.json";
internal static bool CacheCleared { get; set; }
internal static readonly string LogsPath = DirectoryPath + @"\Logs";
internal static readonly string ScanLogPath = LogsPath + @"\game-scan.log";
internal static readonly string SteamLogPath = LogsPath + @"\cream-steam.log";