mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-16 05:34:25 +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>
|
/// </summary>
|
||||||
public bool AddCollection(string name, ModCollection? duplicate)
|
public bool AddCollection(string name, ModCollection? duplicate)
|
||||||
{
|
{
|
||||||
|
if (name.Length == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
var newCollection = Create(name, _collections.Count, duplicate);
|
var newCollection = Create(name, _collections.Count, duplicate);
|
||||||
_collections.Add(newCollection);
|
_collections.Add(newCollection);
|
||||||
_saveService.ImmediateSave(new ModCollectionSave(_modStorage, newCollection));
|
_saveService.ImmediateSave(new ModCollectionSave(_modStorage, newCollection));
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ public sealed class CollectionSelector : ItemSelector<ModCollection>, IDisposabl
|
||||||
}
|
}
|
||||||
|
|
||||||
private string Name(ModCollection collection)
|
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)
|
private void OnCollectionChange(CollectionType type, ModCollection? old, ModCollection? @new, string _3)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue