Optimizations To Main Form

This commit is contained in:
Alan Moon 2025-07-17 15:33:17 -07:00
parent 098a59f555
commit 6acb72975e

View File

@ -364,7 +364,6 @@ namespace qtc_net_client_2
}
}
}
else lvStoreItems.Clear();
}
private async void lvStoreItems_DoubleClick(object sender, EventArgs e)
@ -588,6 +587,7 @@ namespace qtc_net_client_2
await RefreshRoomsList();
// set status context menu checked
// TODO - figure out more efficient way to do this
UserStatus cuStatus = (UserStatus)_apiService.CurrentUser.Status;
switch (cuStatus)
{
@ -778,11 +778,9 @@ namespace qtc_net_client_2
{
while (true)
{
if (!IsHandleCreated) { LoggingService.LogString("Form Handle Wasn't Created"); return; }
if (InvokeRequired && !IsDisposed)
if(IsHandleCreated && !IsDisposed)
{
BeginInvoke(async delegate ()
await Invoke(async delegate ()
{
label.ForeColor = Color.Red;
await Task.Delay(500);
@ -790,11 +788,6 @@ namespace qtc_net_client_2
await Task.Delay(500);
});
}
label.ForeColor = Color.Red;
await Task.Delay(500);
label.ForeColor = Color.Blue;
await Task.Delay(500);
}
}