From ff37ebbf08e993a259cee777a97795f700002831 Mon Sep 17 00:00:00 2001 From: shoushou <100991210+shoushou1106@users.noreply.github.com> Date: Mon, 28 Aug 2023 19:13:19 +0800 Subject: [PATCH] Update FrostyEditor/ViewModels/Windows/ProfileSelectWindowViewModel.cs Co-authored-by: jona <93538252+wannkunstbeikor@users.noreply.github.com> --- .../ViewModels/Windows/ProfileSelectWindowViewModel.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/FrostyEditor/ViewModels/Windows/ProfileSelectWindowViewModel.cs b/FrostyEditor/ViewModels/Windows/ProfileSelectWindowViewModel.cs index 487584848..7ddb2d604 100644 --- a/FrostyEditor/ViewModels/Windows/ProfileSelectWindowViewModel.cs +++ b/FrostyEditor/ViewModels/Windows/ProfileSelectWindowViewModel.cs @@ -109,7 +109,10 @@ private async Task AddProfile() // Make sure config doesn't already exist bool isProfileExist = false; - foreach (string profile in Config.GameProfiles) + if (Config.AddGame(key, Path.GetDirectoryName(file.Path.LocalPath) ?? string.Empty)) + { + Profiles.Add(new ProfileConfig(key)); + } { if (key == profile) {