From ce09b474561bc41095b756a085472fa8f7f5be8f Mon Sep 17 00:00:00 2001 From: Pilzinsel64 Date: Mon, 17 Nov 2025 16:54:15 +0100 Subject: [PATCH] optimizations --- .../GitLabRepoWorkspaceConfigEditorView.axaml.cs | 5 +++++ .../Workspaces/LocalFolder/LocalFolderWorkspace.cs | 3 ++- .../LocalFolderWorkspaceConfigEditorView.axaml | 3 +++ .../LocalFolderWorkspaceConfigEditorView.axaml.cs | 14 ++++++++++++-- ModpackUpdater.Apps.Manager/Ui/MainWindow.axaml.cs | 4 ++++ 5 files changed, 26 insertions(+), 3 deletions(-) diff --git a/ModpackUpdater.Apps.Manager/Features/Workspaces/GitLabRepo/GitLabRepoWorkspaceConfigEditorView.axaml.cs b/ModpackUpdater.Apps.Manager/Features/Workspaces/GitLabRepo/GitLabRepoWorkspaceConfigEditorView.axaml.cs index efd5e13..e9ab3bf 100644 --- a/ModpackUpdater.Apps.Manager/Features/Workspaces/GitLabRepo/GitLabRepoWorkspaceConfigEditorView.axaml.cs +++ b/ModpackUpdater.Apps.Manager/Features/Workspaces/GitLabRepo/GitLabRepoWorkspaceConfigEditorView.axaml.cs @@ -15,4 +15,9 @@ public partial class GitLabRepoWorkspaceConfigEditorView : AvaloniaFlyoutBase DataContext = settings; InitializeComponent(); } + + protected override object? GetResult() + { + return Settings; + } } \ No newline at end of file diff --git a/ModpackUpdater.Apps.Manager/Features/Workspaces/LocalFolder/LocalFolderWorkspace.cs b/ModpackUpdater.Apps.Manager/Features/Workspaces/LocalFolder/LocalFolderWorkspace.cs index a1d705f..25b7043 100644 --- a/ModpackUpdater.Apps.Manager/Features/Workspaces/LocalFolder/LocalFolderWorkspace.cs +++ b/ModpackUpdater.Apps.Manager/Features/Workspaces/LocalFolder/LocalFolderWorkspace.cs @@ -24,7 +24,8 @@ internal class LocalFolderWorkspace(LocalFolderWorkspaceConfig config) : IWorksp rawUpdateInfos = await GetContent(ConfigX.FileLocationUpdateJson); UpdateInfos = UpdateInfos.Parse(rawUpdateInfos); - ConfigX.FolderName = Path.GetFileName(ConfigX.RootFolderPath); + if (string.IsNullOrWhiteSpace(ConfigX.FolderName)) + ConfigX.FolderName = Path.GetFileName(ConfigX.RootFolderPath); return InstallInfos != null && UpdateInfos != null; } diff --git a/ModpackUpdater.Apps.Manager/Features/Workspaces/LocalFolder/LocalFolderWorkspaceConfigEditorView.axaml b/ModpackUpdater.Apps.Manager/Features/Workspaces/LocalFolder/LocalFolderWorkspaceConfigEditorView.axaml index 6d3849e..7a7c12e 100644 --- a/ModpackUpdater.Apps.Manager/Features/Workspaces/LocalFolder/LocalFolderWorkspaceConfigEditorView.axaml +++ b/ModpackUpdater.Apps.Manager/Features/Workspaces/LocalFolder/LocalFolderWorkspaceConfigEditorView.axaml @@ -15,6 +15,9 @@ +