allow remove updates from update collector

This commit is contained in:
2024-10-13 09:31:43 +02:00
parent 8561fdb09b
commit 334b9583c6
2 changed files with 8 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ public partial class UpdatesCollectorUi : RadForm
public int NewVersion { get; set; } = 0;
}
public record ModUpdates(IEnumerable<ModUpdateInfo> List);
public record ModUpdates(List<ModUpdateInfo> List);
private readonly IWorkspace workspace;
private readonly ModpackFactory factory = new();
@@ -117,4 +117,10 @@ public partial class UpdatesCollectorUi : RadForm
UpdateUpdatesItem(radListView_Updates.SelectedItem);
}
}
private void RadListView_Updates_ItemRemoved(object sender, ListViewItemEventArgs e)
{
if (e.Item?.Value is ModUpdateInfo update && CurrentUpdates is not null && CurrentUpdates.List.Contains(update))
CurrentUpdates.List.Remove(update);
}
}