Files
HellionChat/ChatTwo/Util/WrapperUtil.cs
T
Infi c424311b24 - Check auto translation for commands and execute them instead of sending
- Plugin commands trigger the command helper window now
- Fix auto translation with empty text appearing
- Switch up all dalamud payload usage to ROSS if possible
- Prepare 7.5 changes
- Cleanup
2026-04-08 21:15:28 +02:00

26 lines
781 B
C#

using ChatTwo.Resources;
using Dalamud.Interface.ImGuiNotification;
namespace ChatTwo.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.Log.Debug($"Opening URI {uri} in default browser");
Dalamud.Utility.Util.OpenLink(uri.ToString());
}
catch (Exception ex)
{
Plugin.Log.Error($"Error opening URI: {ex}");
AddNotification(Language.Context_OpenInBrowserError, NotificationType.Error);
}
}
}