Files
HellionChat/HellionChat/Util/WrapperUtil.cs
T
JonKazama-Hellion fee2459e73 refactor(services): route logging through IPluginLogProxy
F12.2 step 5b — service cluster (~42 sites in 16 files):
MessageManager, GameFunctions/{Chat, GameFunctions, KeybindManager},
EmoteCache, PayloadHandler, AutoTellTabsService, FontManager, Commands,
Util/{WrapperUtil, AutoTranslate, MemoryUtil}, Message, Themes/ThemeRegistry,
Ipc/ExtraChat, Configuration.

The proxy interface gained Dalamud's params-overload signature
(messageTemplate + params object[]) to cover Configuration.cs:86 which
relies on Serilog-style placeholders.

Verified: zero remaining Plugin.Log.X(...) call-sites in HellionChat/,
build green, build-suite 690/690.
2026-05-13 08:38:40 +02:00

34 lines
894 B
C#

using Dalamud.Interface.ImGuiNotification;
using HellionChat.Resources;
namespace HellionChat.Util;
public static class WrapperUtil
{
public static void AddNotification(string content, NotificationType type, bool minimized = true)
{
Plugin.Notification.AddNotification(
new Notification
{
Content = content,
Type = type,
Minimized = minimized,
}
);
}
public static void TryOpenUri(Uri uri)
{
try
{
Plugin.LogProxy.Debug($"Opening URI {uri} in default browser");
Plugin.PlatformUtil.OpenLink(uri.ToString());
}
catch (Exception ex)
{
Plugin.LogProxy.Error($"Error opening URI: {ex}");
AddNotification(Language.Context_OpenInBrowserError, NotificationType.Error);
}
}
}