mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 08:36:11 +02:00
909 lines
32 KiB
HTML
909 lines
32 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Class ChatMessageManager | EchoHub Documentation </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Class ChatMessageManager | EchoHub Documentation ">
|
|
|
|
<meta name="description" content="Owns chat message storage, formatting, and mutation. Fires when a channel's message list is modified so the UI layer can refresh.">
|
|
<link rel="icon" href="../../images/hue_icon.svg">
|
|
<link rel="stylesheet" href="../../public/docfx.min.css">
|
|
<link rel="stylesheet" href="../../public/main.css">
|
|
<meta name="docfx:navrel" content="../../toc.html">
|
|
<meta name="docfx:tocrel" content="../toc.html">
|
|
|
|
<meta name="docfx:rel" content="../../">
|
|
|
|
|
|
<meta name="docfx:docurl" content="https://github.com/HueByte/EchoHub/new/master/apiSpec/new?filename=EchoHub_Client_UI_Chat_ChatMessageManager.md&value=---%0Auid%3A%20EchoHub.Client.UI.Chat.ChatMessageManager%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
|
|
<meta name="loc:inThisArticle" content="In this article">
|
|
<meta name="loc:searchResultsCount" content="{count} results for "{query}"">
|
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
|
<meta name="loc:tocFilter" content="Filter by title">
|
|
<meta name="loc:nextArticle" content="Next">
|
|
<meta name="loc:prevArticle" content="Previous">
|
|
<meta name="loc:themeLight" content="Light">
|
|
<meta name="loc:themeDark" content="Dark">
|
|
<meta name="loc:themeAuto" content="Auto">
|
|
<meta name="loc:changeTheme" content="Change theme">
|
|
<meta name="loc:copy" content="Copy">
|
|
<meta name="loc:downloadPdf" content="Download PDF">
|
|
|
|
<script type="module" src="./../../public/docfx.min.js"></script>
|
|
|
|
<script>
|
|
const theme = localStorage.getItem('theme') || 'auto'
|
|
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
|
|
<header class="bg-body border-bottom">
|
|
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
|
|
<div class="container-xxl flex-nowrap">
|
|
<a class="navbar-brand" href="../../index.html">
|
|
<img id="logo" class="svg" src="../../images/hue_icon.svg" alt="EchoHub">
|
|
EchoHub
|
|
</a>
|
|
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
|
|
<i class="bi bi-three-dots"></i>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navpanel">
|
|
<div id="navbar">
|
|
<form class="search" role="search" id="search">
|
|
<i class="bi bi-search"></i>
|
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="container-xxl">
|
|
<div class="toc-offcanvas">
|
|
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
|
|
<div class="offcanvas-header">
|
|
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
|
|
</div>
|
|
<div class="offcanvas-body">
|
|
<nav class="toc" id="toc"></nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="actionbar">
|
|
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
|
|
<i class="bi bi-list"></i>
|
|
</button>
|
|
|
|
<nav id="breadcrumb"></nav>
|
|
</div>
|
|
|
|
<article data-uid="EchoHub.Client.UI.Chat.ChatMessageManager">
|
|
|
|
|
|
|
|
<h1 id="EchoHub_Client_UI_Chat_ChatMessageManager" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager" class="text-break">
|
|
Class ChatMessageManager <a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h1>
|
|
|
|
<div class="facts text-secondary">
|
|
<dl><dt>Namespace</dt><dd><a class="xref" href="EchoHub.html">EchoHub</a>.<a class="xref" href="EchoHub.Client.html">Client</a>.<a class="xref" href="EchoHub.Client.UI.html">UI</a>.<a class="xref" href="EchoHub.Client.UI.Chat.html">Chat</a></dd></dl>
|
|
<dl><dt>Assembly</dt><dd>EchoHub.Client.dll</dd></dl>
|
|
</div>
|
|
|
|
<div class="markdown summary"><p>Owns chat message storage, formatting, and mutation.
|
|
Fires <a class="xref" href="EchoHub.Client.UI.Chat.ChatMessageManager.html#EchoHub_Client_UI_Chat_ChatMessageManager_MessagesChanged">MessagesChanged</a> when a channel's message list is modified
|
|
so the UI layer can refresh.</p>
|
|
</div>
|
|
<div class="markdown conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public sealed class ChatMessageManager</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<dl class="typelist inheritance">
|
|
<dt>Inheritance</dt>
|
|
<dd>
|
|
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
|
|
<div><span class="xref">ChatMessageManager</span></div>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<dl class="typelist inheritedMembers">
|
|
<dt>Inherited Members</dt>
|
|
<dd>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
|
|
</div>
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="constructors">Constructors
|
|
</h2>
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager__ctor_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.#ctor*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager__ctor" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.#ctor">
|
|
ChatMessageManager()
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public ChatMessageManager()</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="fields">Fields
|
|
</h2>
|
|
|
|
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_ContentIndentCols" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.ContentIndentCols">
|
|
ContentIndentCols
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Columns before message text starts: "HH:mm " + nick column + " │ ".</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public const int ContentIndentCols = 21</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Field Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_NickColWidth" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.NickColWidth">
|
|
NickColWidth
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Columns reserved for the right-aligned nick column (WeeChat-style).</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public const int NickColWidth = 12</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Field Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="properties">Properties
|
|
</h2>
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_CurrentChannel_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.CurrentChannel*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_CurrentChannel" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.CurrentChannel">
|
|
CurrentChannel
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>The currently active channel (used for unread tracking and @mention detection).</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public string CurrentChannel { get; set; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_CurrentUser_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.CurrentUser*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_CurrentUser" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.CurrentUser">
|
|
CurrentUser
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public string CurrentUser { get; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_LastReadIds_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.LastReadIds*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_LastReadIds" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.LastReadIds">
|
|
LastReadIds
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Last message the user has read per channel — persisted by the orchestrator so
|
|
unread/mention state can be seeded from history on the next connect.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public IReadOnlyDictionary<string, Guid> LastReadIds { get; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><span class="xref">IReadOnlyDictionary</span><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_MentionChannels_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.MentionChannels*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_MentionChannels" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.MentionChannels">
|
|
MentionChannels
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Channels with an unread @mention of the current user (cleared by <a class="xref" href="EchoHub.Client.UI.Chat.ChatMessageManager.html#EchoHub_Client_UI_Chat_ChatMessageManager_ClearUnread_System_String_">ClearUnread(string)</a>).</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public IReadOnlySet<string> MentionChannels { get; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><span class="xref">IReadOnlySet</span><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="methods">Methods
|
|
</h2>
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_AddMessage_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.AddMessage*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_AddMessage_EchoHub_Core_DTOs_MessageDto_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.AddMessage(EchoHub.Core.DTOs.MessageDto)">
|
|
AddMessage(MessageDto)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Format and store a received message. Increments unread count if not the active channel.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void AddMessage(MessageDto message)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>message</code> <a class="xref" href="../core/EchoHub.Core.DTOs.MessageDto.html">MessageDto</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_AddStatusMessage_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.AddStatusMessage*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_AddStatusMessage_System_String_System_String_System_String_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.AddStatusMessage(System.String,System.String,System.String)">
|
|
AddStatusMessage(string, string, string)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Add a status change message to a channel with colored styling.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void AddStatusMessage(string channelName, string username, string status)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channelName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
<dt><code>username</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
<dt><code>status</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_AddSystemMessage_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.AddSystemMessage*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_AddSystemMessage_System_String_System_String_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.AddSystemMessage(System.String,System.String)">
|
|
AddSystemMessage(string, string)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Add a system/informational message to a channel with colored styling.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void AddSystemMessage(string channelName, string text)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channelName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
<dt><code>text</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_ClearAll_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.ClearAll*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_ClearAll" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.ClearAll">
|
|
ClearAll()
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Reset all message state (used on disconnect).</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void ClearAll()</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_ClearChannelMessages_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.ClearChannelMessages*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_ClearChannelMessages_System_String_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.ClearChannelMessages(System.String)">
|
|
ClearChannelMessages(string)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Clear all messages from a specific channel.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void ClearChannelMessages(string channelName)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channelName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_ClearUnread_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.ClearUnread*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_ClearUnread_System_String_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.ClearUnread(System.String)">
|
|
ClearUnread(string)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void ClearUnread(string channelName)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channelName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_GetMessages_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.GetMessages*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_GetMessages_System_String_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.GetMessages(System.String)">
|
|
GetMessages(string)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public List<ChatLine>? GetMessages(string channelName)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channelName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><span class="xref">List</span><<a class="xref" href="EchoHub.Client.UI.Chat.ChatLine.html">ChatLine</a>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_GetUnreadCount_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.GetUnreadCount*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_GetUnreadCount_System_String_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.GetUnreadCount(System.String)">
|
|
GetUnreadCount(string)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public int GetUnreadCount(string channelName)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channelName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_LoadHistory_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.LoadHistory*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_LoadHistory_System_String_System_Collections_Generic_List_EchoHub_Core_DTOs_MessageDto__System_Nullable_System_Guid__" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.LoadHistory(System.String,System.Collections.Generic.List{EchoHub.Core.DTOs.MessageDto},System.Nullable{System.Guid})">
|
|
LoadHistory(string, List<MessageDto>, Guid?)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Load historical messages into a channel, replacing any existing messages.
|
|
When <code class="paramref">lastReadId</code> is given (persisted from a previous session),
|
|
messages after it seed the unread count, @mention highlight, and the
|
|
"new messages" marker — so activity that happened while offline still lights up.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void LoadHistory(string channelName, List<MessageDto> messages, Guid? lastReadId = null)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channelName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
<dt><code>messages</code> <span class="xref">List</span><<a class="xref" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Core/DTOs/ChatDtos.cs">MessageDto</a>></dt>
|
|
<dd></dd>
|
|
<dt><code>lastReadId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a>?</dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_PrependHistory_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.PrependHistory*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_PrependHistory_System_String_System_Collections_Generic_List_EchoHub_Core_DTOs_MessageDto__" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.PrependHistory(System.String,System.Collections.Generic.List{EchoHub.Core.DTOs.MessageDto})">
|
|
PrependHistory(string, List<MessageDto>)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Prepend older messages at the front of a channel's buffer, skipping any that are already present.
|
|
Fires <a class="xref" href="EchoHub.Client.UI.Chat.ChatMessageManager.html#EchoHub_Client_UI_Chat_ChatMessageManager_HistoryPrepended">HistoryPrepended</a> when new lines are actually inserted.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void PrependHistory(string channelName, List<MessageDto> olderMessages)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channelName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
<dt><code>olderMessages</code> <span class="xref">List</span><<a class="xref" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Core/DTOs/ChatDtos.cs">MessageDto</a>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_RemoveMessage_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.RemoveMessage*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_RemoveMessage_System_String_System_Guid_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.RemoveMessage(System.String,System.Guid)">
|
|
RemoveMessage(string, Guid)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Remove all lines associated with a specific message ID.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void RemoveMessage(string channelName, Guid messageId)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>channelName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
<dt><code>messageId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_SetChatWidth_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.SetChatWidth*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_SetChatWidth_System_Int32_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.SetChatWidth(System.Int32)">
|
|
SetChatWidth(int)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void SetChatWidth(int width)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>width</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="EchoHub_Client_UI_Chat_ChatMessageManager_SetCurrentUser_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.SetCurrentUser*"></a>
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_SetCurrentUser_System_String_" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.SetCurrentUser(System.String)">
|
|
SetCurrentUser(string)
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void SetCurrentUser(string username)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>username</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="events">Events
|
|
</h2>
|
|
|
|
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_HistoryPrepended" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.HistoryPrepended">
|
|
HistoryPrepended
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Fired after older messages are prepended to a channel's buffer. Parameter is the channel name.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public event Action<string>? HistoryPrepended</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Event Type</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 id="EchoHub_Client_UI_Chat_ChatMessageManager_MessagesChanged" data-uid="EchoHub.Client.UI.Chat.ChatMessageManager.MessagesChanged">
|
|
MessagesChanged
|
|
<a class="header-action link-secondary" title="View source" href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs"><i class="bi bi-code-slash"></i></a>
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Fired after any mutation to a channel's messages. Parameter is the channel name.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public event Action<string>? MessagesChanged</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Event Type</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
|
|
<div class="contribution d-print-none">
|
|
<a href="https://github.com/HueByte/EchoHub/blob/master/src/EchoHub.Client/UI/Chat/ChatMessageManager.cs" class="edit-link">Edit this page</a>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="affix">
|
|
<nav id="affix"></nav>
|
|
</div>
|
|
</main>
|
|
|
|
<div class="container-xxl search-results" id="search-results"></div>
|
|
|
|
<footer class="border-top text-secondary">
|
|
<div class="container-xxl">
|
|
<div class="flex-fill">
|
|
<div class='footer-custom'><div class='footer-inner'><span class='footer-brand'>EchoHub</span><span class='footer-sep'>·</span><a href='https://github.com/HueByte/EchoHub'>GitHub</a><span class='footer-sep'>·</span><a href='https://echohub.voidcube.cloud'>Website</a></div></div>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|