mirror of
https://github.com/FroggMaster/CreamInstaller.git
synced 2026-07-28 14:47:04 -07:00
Improve Clear Cache Data
- Improves clear cache data by ensuring the app automatically reloads/reprompts the scan window
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user