Fixed Messages Not Showing

This commit is contained in:
JacobTech 2024-04-11 20:22:40 -04:00
parent 78c94e17ca
commit dc1c028d5a
2 changed files with 4 additions and 1 deletions

View File

@ -115,7 +115,9 @@ public class Channel : UserControl
Console.WriteLine("Waiting"); Console.WriteLine("Waiting");
Task.WaitAll(mm); Task.WaitAll(mm);
Globals.ms.pc.MessageFlow.ForceScrollUpdate(); Globals.ms.pc.MessageFlow.ForceScrollUpdate();
Globals.ms.pc.MessageFlow.ScrollToBottom(); if (Globals.ms.pc.MessageFlow.Controls.Length > 1 && Globals.ms.pc.MessageFlow.Controls[Globals.ms.pc.MessageFlow.Controls.Length - 1].Location.Y + Globals.ms.pc.MessageFlow.Controls[Globals.ms.pc.MessageFlow.Controls.Length - 1].Size.Y > Globals.ms.pc.MessageFlow.Size.Y)
Globals.ms.pc.MessageFlow.ScrollToBottom();
else Globals.ms.pc.MessageFlow.ScrollToTop();
Console.WriteLine("Done"); Console.WriteLine("Done");
} }
BlockDraw = false; BlockDraw = false;

View File

@ -402,6 +402,7 @@ public class PublicChat : UserControl
public void ClearChat() public void ClearChat()
{ {
MessageFlow.Controls.Clear(); MessageFlow.Controls.Clear();
MessageFlow.ScrollValue = 0;
MessageFlow.ScrollUpdatesInterval = 33; MessageFlow.ScrollUpdatesInterval = 33;
lastm = null; lastm = null;
lastUser = null; lastUser = null;