diff --git a/src/SharpIDE.Godot/Features/IdeSettings/AppState.cs b/src/SharpIDE.Godot/Features/IdeSettings/AppState.cs index 105e7f8..9580e4e 100644 --- a/src/SharpIDE.Godot/Features/IdeSettings/AppState.cs +++ b/src/SharpIDE.Godot/Features/IdeSettings/AppState.cs @@ -4,7 +4,7 @@ public class AppState { public string? LastOpenSolutionFilePath { get; set; } public IdeSettings IdeSettings { get; set; } = new IdeSettings(); - public List PreviouslyOpenedSolutions { get; set; } = []; + public HashSet PreviouslyOpenedSolutions { get; set; } = []; } public class IdeSettings @@ -12,7 +12,7 @@ public class IdeSettings public bool AutoOpenLastSolution { get; set; } } -public class PreviouslyOpenedSln +public record PreviouslyOpenedSln { public required string Name { get; set; } public required string FilePath { get; set; } diff --git a/src/SharpIDE.Godot/IdeWindow.cs b/src/SharpIDE.Godot/IdeWindow.cs index 50a923d..0a71bee 100644 --- a/src/SharpIDE.Godot/IdeWindow.cs +++ b/src/SharpIDE.Godot/IdeWindow.cs @@ -79,6 +79,7 @@ public partial class IdeWindow : Control return; } ideRoot.SetSlnFilePath(slnPath); + Singletons.AppState.PreviouslyOpenedSolutions.Add(new PreviouslyOpenedSln { FilePath = slnPath, Name = Path.GetFileName(slnPath) }); await this.InvokeAsync(() => {