feat: batch config saves

This commit is contained in:
goat 2022-11-01 19:43:38 +01:00
parent 4769239b19
commit 9c16359914
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
17 changed files with 69 additions and 37 deletions

View file

@ -6,6 +6,7 @@ using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using Dalamud.Configuration.Internal;
using Dalamud.Game.Gui;
using Dalamud.Game.Gui.Toast;
using Dalamud.Game.Network;
@ -372,12 +373,15 @@ public sealed class Framework : IDisposable, IServiceType
var chatGui = Service<ChatGui>.GetNullable();
var toastGui = Service<ToastGui>.GetNullable();
var gameNetwork = Service<GameNetwork>.GetNullable();
var config = Service<DalamudConfiguration>.GetNullable();
if (chatGui == null || toastGui == null || gameNetwork == null)
goto original;
chatGui.UpdateQueue();
toastGui.UpdateQueue();
gameNetwork.UpdateQueue();
config?.Update();
}
catch (Exception ex)
{