Maybe fix the race condition and add more logging.

This commit is contained in:
Ottermandias 2023-05-29 18:48:46 +02:00
parent f8d1fcf4e2
commit 02fe5a4fb3
6 changed files with 96 additions and 53 deletions

View file

@ -32,14 +32,11 @@ public partial class IndividualCollections
return ReadJObjectInternal(obj, storage);
void Func()
{
saver.DalamudFramework.RunOnFrameworkThread(() =>
{
if (ReadJObjectInternal(obj, storage))
saver.ImmediateSave(parent);
IsLoaded = true;
Loaded.Invoke();
_actorService.FinishedCreation -= Func;
});
if (ReadJObjectInternal(obj, storage))
saver.ImmediateSave(parent);
IsLoaded = true;
Loaded.Invoke();
_actorService.FinishedCreation -= Func;
}
_actorService.FinishedCreation += Func;
return false;