mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-14 20:54:16 +01:00
Fix issue with creating unnamed collections.
This commit is contained in:
parent
aba68cfb92
commit
5101b73fdc
2 changed files with 4 additions and 1 deletions
|
|
@ -153,6 +153,9 @@ public class CollectionStorage : IReadOnlyList<ModCollection>, IDisposable
|
|||
/// </summary>
|
||||
public bool AddCollection(string name, ModCollection? duplicate)
|
||||
{
|
||||
if (name.Length == 0)
|
||||
return false;
|
||||
|
||||
var newCollection = Create(name, _collections.Count, duplicate);
|
||||
_collections.Add(newCollection);
|
||||
_saveService.ImmediateSave(new ModCollectionSave(_modStorage, newCollection));
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public sealed class CollectionSelector : ItemSelector<ModCollection>, IDisposabl
|
|||
}
|
||||
|
||||
private string Name(ModCollection collection)
|
||||
=> IncognitoMode ? collection.AnonymizedName : collection.Name;
|
||||
=> IncognitoMode || collection.Name.Length == 0 ? collection.AnonymizedName : collection.Name;
|
||||
|
||||
private void OnCollectionChange(CollectionType type, ModCollection? old, ModCollection? @new, string _3)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue