mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-30 20:33:43 +01:00
Add some tracking of cached collections.
This commit is contained in:
parent
a9ff6135b3
commit
ef5cf14b2b
4 changed files with 45 additions and 32 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Game.ClientState.Objects.Enums;
|
||||
using Dalamud.Interface.Internal.Notifications;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
|
@ -34,7 +35,7 @@ public partial class IndividualCollections
|
|||
{
|
||||
if (ReadJObjectInternal(obj, storage))
|
||||
saver.ImmediateSave(parent);
|
||||
Loaded?.Invoke();
|
||||
saver.DalamudFramework.RunOnFrameworkThread(() => Loaded.Invoke());
|
||||
_actorService.FinishedCreation -= Func;
|
||||
}
|
||||
_actorService.FinishedCreation += Func;
|
||||
|
|
|
|||
|
|
@ -17,15 +17,16 @@ public sealed partial class IndividualCollections
|
|||
private readonly List<(string DisplayName, IReadOnlyList<ActorIdentifier> Identifiers, ModCollection Collection)> _assignments = new();
|
||||
private readonly Dictionary<ActorIdentifier, ModCollection> _individuals = new();
|
||||
|
||||
public event Action? Loaded;
|
||||
public event Action Loaded;
|
||||
|
||||
public IReadOnlyList<(string DisplayName, IReadOnlyList<ActorIdentifier> Identifiers, ModCollection Collection)> Assignments
|
||||
=> _assignments;
|
||||
|
||||
public IndividualCollections(ActorService actorService, Configuration config)
|
||||
{
|
||||
_config = config;
|
||||
_actorService = actorService;
|
||||
_config = config;
|
||||
_actorService = actorService;
|
||||
Loaded += () => Penumbra.Log.Information($"{_assignments.Count} Individual Assignments loaded after delay.");
|
||||
}
|
||||
|
||||
public enum AddResult
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue