This commit is contained in:
2025-11-17 07:19:43 +01:00
parent 72a81e05ad
commit e584996043
29 changed files with 134 additions and 668 deletions

View File

@@ -1,8 +1,11 @@
using System.Text;
using Avalonia.Controls;
using ModpackUpdater.Apps.Manager.Api.Model;
using ModpackUpdater.Apps.Manager.LangRes;
using ModpackUpdater.Apps.Manager.Ui;
using ModpackUpdater.Apps.Manager.Ui.Models;
using ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
using ModpackUpdater.Apps.Manager.Ui.Models.UpdatesCollectorViewMode;
using ModpackUpdater.Manager;
using MsBox.Avalonia;
using OfficeOpenXml;
@@ -52,11 +55,11 @@ internal static class SharedFunctions
// Collect updates
var result = await AvaloniaFlyoutBase.Show(new UpdatesCollectorView(api.Model.CurrentWorkspace, actions), api.MainWindow);
if (result.Result is null || result.CurrentUpdates is null)
if (result.Result is not ModUpdates resultUpdates)
return false;
// Collect versions with changes
var updates = result.CurrentUpdates.List.Where(update => update.Origin.SourceTag != update.AvailableVersions[update.NewVersion].Key).ToList();
var updates = resultUpdates.List.Where(update => update.Origin.SourceTag != update.AvailableVersions[update.NewVersion].Key).ToList();
// Path install actions
foreach (var update in updates)