- 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
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using ChatTwo.Resources;
|
||||
using ChatTwo.Resources;
|
||||
using Dalamud.Interface.ImGuiNotification;
|
||||
|
||||
namespace ChatTwo.Util;
|
||||
@@ -11,7 +10,7 @@ public static class WrapperUtil
|
||||
Plugin.Notification.AddNotification(new Notification { Content = content, Type = type, Minimized = minimized });
|
||||
}
|
||||
|
||||
public static void TryOpenURI(Uri uri)
|
||||
public static void TryOpenUri(Uri uri)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -24,21 +23,4 @@ public static class WrapperUtil
|
||||
AddNotification(Language.Context_OpenInBrowserError, NotificationType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<(T Value, int Index)> WithIndex<T>(this IEnumerable<T> list)
|
||||
=> list.Select((x, i) => (x, i));
|
||||
|
||||
/// <summary> Return the first object fulfilling the predicate or null for structs.</summary>
|
||||
/// <param name="values"> The enumerable. </param>
|
||||
/// <param name="predicate"> The predicate. </param>
|
||||
/// <returns> The first object fulfilling the predicate, or a null-optional. </returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
|
||||
public static T? FirstOrNull<T>(this IEnumerable<T> values, Func<T, bool> predicate) where T : struct
|
||||
{
|
||||
foreach(var val in values)
|
||||
if (predicate(val))
|
||||
return val;
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user