Snapshot for release 2026.10.12.1 (internal ef4d41d)
This commit is contained in:
parent
08b80eed86
commit
b0f9d74b21
54 changed files with 5062 additions and 935 deletions
31
tools/ChatHistoryBench/Stubs.cs
Normal file
31
tools/ChatHistoryBench/Stubs.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
// The two engine pieces ChatRouting.cs calls, without the engine. ChatModel's are copies
|
||||
// of the real ones in src/RynthCore.Engine/UI/Data/ChatData.cs (MentionEligible, and
|
||||
// LineInTab / LineVisible, which the chat face filters with).
|
||||
|
||||
namespace RynthCore.Engine.Compatibility
|
||||
{
|
||||
internal static class RynthLog
|
||||
{
|
||||
public static int Lines;
|
||||
public static void UI(string message) { Lines++; }
|
||||
}
|
||||
}
|
||||
|
||||
namespace RynthCore.Engine.UI.Data
|
||||
{
|
||||
internal static class ChatModel
|
||||
{
|
||||
public static int FilterBumps;
|
||||
|
||||
internal static bool MentionEligible(string channel, int chatType) =>
|
||||
(channel == "Chat" || channel == "Channels") && chatType is not (4 or 9 or 11);
|
||||
|
||||
internal static void BumpFiltersVersion() => FilterBumps++;
|
||||
|
||||
public static bool LineInTab(ChatLine line, string tab) => line.Route.ShowsIn(tab, line.Channel);
|
||||
|
||||
public static bool LineVisible(ChatLine line, string tab, string search) =>
|
||||
LineInTab(line, tab)
|
||||
&& (search.Length == 0 || line.FormattedText.Contains(search, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue