aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Ava/Ui/Windows
diff options
context:
space:
mode:
authorMutantAura <44103205+MutantAura@users.noreply.github.com>2022-08-21 14:07:28 +0100
committerGitHub <noreply@github.com>2022-08-21 13:07:28 +0000
commit54421760c33f77de78fee58d637552d2e00d464b (patch)
tree070b8a94d395ee7756a00cc8298663b6f6d655ea /Ryujinx.Ava/Ui/Windows
parent88a0e720cbe567aff67b6124aa9e6cfc17599739 (diff)
Check if game directories have been updated before refreshing GUI (#3607)
* Check if game directories have been updated before refreshing list on save. * Cleanup spacing * Add Avalonia and reset value after saving * Fix Avalonia * Fix multiple directories not being added in GTK
Diffstat (limited to 'Ryujinx.Ava/Ui/Windows')
-rw-r--r--Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml.cs b/Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml.cs
index 97e9bfed..5b2ea276 100644
--- a/Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml.cs
+++ b/Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml.cs
@@ -162,6 +162,7 @@ namespace Ryujinx.Ava.Ui.Windows
if (!string.IsNullOrWhiteSpace(path) && Directory.Exists(path) && !ViewModel.GameDirectories.Contains(path))
{
ViewModel.GameDirectories.Add(path);
+ ViewModel.DirectoryChanged = true;
}
else
{
@@ -170,6 +171,7 @@ namespace Ryujinx.Ava.Ui.Windows
if (!string.IsNullOrWhiteSpace(path))
{
ViewModel.GameDirectories.Add(path);
+ ViewModel.DirectoryChanged = true;
}
}
}
@@ -181,6 +183,7 @@ namespace Ryujinx.Ava.Ui.Windows
foreach (string path in selected)
{
ViewModel.GameDirectories.Remove(path);
+ ViewModel.DirectoryChanged = true;
}
}
@@ -232,10 +235,12 @@ namespace Ryujinx.Ava.Ui.Windows
ControllerSettings?.SaveCurrentProfile();
- if (Owner is MainWindow window)
+ if (Owner is MainWindow window && ViewModel.DirectoryChanged)
{
window.ViewModel.LoadApplications();
}
+
+ ViewModel.DirectoryChanged = false;
}
protected override void OnClosed(EventArgs e)