Fix RoomName Not Getting Set When Joining Room

This commit is contained in:
Alan Moon 2025-12-14 13:47:00 -08:00
parent b80a502fe9
commit 7899e1b091
5 changed files with 19 additions and 16 deletions

View File

@ -278,7 +278,7 @@ namespace qtcnet_client
await _gatewayService.JoinRoomAsync(new() // TODO - refactor this server side (its so bad)
{
Id = _roomCtrl.RoomId,
Name = _roomCtrl.Name,
Name = _roomCtrl.RoomName,
});
}
}

View File

@ -170,6 +170,9 @@
pbProfileImage.SizeMode = PictureBoxSizeMode.Zoom;
pbProfileImage.TabIndex = 3;
pbProfileImage.TabStop = false;
pbProfileImage.MouseClick += pbProfileImage_Click;
pbProfileImage.MouseEnter += pbProfileImage_MouseEnter;
pbProfileImage.MouseLeave += pbProfileImage_MouseLeave;
//
// lblStatus
//

View File

@ -74,9 +74,9 @@ namespace qtcnet_client.Forms
// get owned store items and populate context strip
var _storeItems = await _apiService.GetOwnedStoreItems();
if(_storeItems.Success && _storeItems.Data != null)
if (_storeItems.Success && _storeItems.Data != null)
{
foreach(var item in _storeItems.Data)
foreach (var item in _storeItems.Data)
{
// get item
var _item = await _apiService.GetStoreItem(item.StoreItemId);
@ -89,8 +89,8 @@ namespace qtcnet_client.Forms
}
lblStatus.Visible = true;
if(string.IsNullOrEmpty(TextStatus))
if (string.IsNullOrEmpty(TextStatus))
lblStatus.Text = "Enter Status Here";
lblStatus.Font = new("Segoe UI", 9, FontStyle.Bold | FontStyle.Italic);
@ -134,10 +134,10 @@ namespace qtcnet_client.Forms
{
// for each tag the user has, get the image associated with it from the server
List<Bitmap> _tagImages = [];
foreach(var tag in Tags)
foreach (var tag in Tags)
{
var _res = await _apiService.GetTagPic(tag);
if(_res.Success && _res.Data != null)
if (_res.Success && _res.Data != null)
{
// create a picturebox control and add it to the tag table
Bitmap bm = new(new MemoryStream(_res.Data));
@ -152,7 +152,7 @@ namespace qtcnet_client.Forms
{
flpTagIcons.SuspendLayout();
foreach(var img in tagImages)
foreach (var img in tagImages)
{
PictureBox tagPb = new()
{
@ -170,7 +170,7 @@ namespace qtcnet_client.Forms
private async void ProfileForm_StoreItemToolStripClick(object? sender, EventArgs e)
{
if(sender is ToolStripItem _tsi && _tsi.Tag is int _itemId)
if (sender is ToolStripItem _tsi && _tsi.Tag is int _itemId)
{
var _res = await _apiService.UpdateUserInformationAsync(new()
{
@ -331,7 +331,7 @@ namespace qtcnet_client.Forms
private void TxtStatusEdit_KeyDown(object? sender, KeyEventArgs e)
{
if(sender is TextBox txtStatusEdit && e.KeyCode == Keys.Enter)
if (sender is TextBox txtStatusEdit && e.KeyCode == Keys.Enter)
{
lblStatus.Text = txtStatusEdit.Text;
flpPfpStatus.Controls.Remove(txtStatusEdit);
@ -371,7 +371,7 @@ namespace qtcnet_client.Forms
private void pbProfileImage_Click(object sender, MouseEventArgs e)
{
if(UserId == _apiService.CurrentUser?.Id)
if (UserId == _apiService.CurrentUser?.Id)
{
Thread _fileDialogThread = new Thread(async () =>
{
@ -384,11 +384,11 @@ namespace qtcnet_client.Forms
Title = "Select A New Profile Image"
};
var _res = openFileDialog.ShowDialog();
if(_res == DialogResult.OK)
if (_res == DialogResult.OK)
{
// update the current users profile image
var _apiRes = await _apiService.UpdateUserProfilePic(openFileDialog.FileName);
if(_apiRes.Success)
if (_apiRes.Success)
{
pbProfileImage.Image = _imgFactory.GetAndCreateProfileImage(UserId, Status, CosmeticId);
pbProfileImage.Invalidate();
@ -403,7 +403,7 @@ namespace qtcnet_client.Forms
private void pbProfileImage_MouseEnter(object sender, EventArgs e)
{
if(UserId == _apiService.CurrentUser?.Id)
if (UserId == _apiService.CurrentUser?.Id)
{
Graphics g = pbProfileImage.CreateGraphics();
Rectangle rect = pbProfileImage.ClientRectangle;

View File

@ -81,7 +81,7 @@ namespace qtcnet_client.Properties {
}
/// <summary>
/// Looks up a localized string similar to 1.0.0.
/// Looks up a localized string similar to 2.0.5.0.
/// </summary>
internal static string AssemblyVersion {
get {

View File

@ -167,7 +167,7 @@
<value>..\Resources\DNDIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="AssemblyVersion" xml:space="preserve">
<value>1.0.0</value>
<value>2.0.5.0</value>
</data>
<data name="Tic-tac-toe" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Tic-tac-toe.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>