Fix collections not being added on creation.

This commit is contained in:
Ottermandias 2024-06-01 18:13:46 +02:00
parent b79600ea14
commit 24d4e9fac6

View file

@ -154,6 +154,7 @@ public class CollectionStorage : IReadOnlyList<ModCollection>, IDisposable
public bool AddCollection(string name, ModCollection? duplicate)
{
var newCollection = Create(name, _collections.Count, duplicate);
_collections.Add(newCollection);
_saveService.ImmediateSave(new ModCollectionSave(_modStorage, newCollection));
Penumbra.Messager.NotificationMessage($"Created new collection {newCollection.AnonymizedName}.", NotificationType.Success, false);
_communicator.CollectionChange.Invoke(CollectionType.Inactive, null, newCollection, string.Empty);