Fix Cosmetics Not Showing In DM Form Sometimes
This commit is contained in:
parent
c1ca1ec402
commit
520b01f5a0
@ -349,22 +349,26 @@ namespace qtcnet_client
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProfileForm_OnMessageClicked(object? sender, EventArgs e)
|
private async void ProfileForm_OnMessageClicked(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if(sender is ProfileForm _profileForm)
|
if(sender is ProfileForm _profileForm)
|
||||||
{
|
{
|
||||||
// create dm form
|
var _userInfo = await _apiService.GetUserInformationAsync(_profileForm.UserId);
|
||||||
DirectMessageForm _dmForm = new(_imgFactory)
|
if(_userInfo.Success && _userInfo.Data != null)
|
||||||
{
|
{
|
||||||
UserId = _profileForm.UserId,
|
// create dm form
|
||||||
Username = _profileForm.Username,
|
DirectMessageForm _dmForm = new(_imgFactory)
|
||||||
ProfileImage = _imgFactory.GetAndCreateProfileImage(_profileForm.UserId, -1), // TODO - probably rework forms to take in models instead of individual params
|
{
|
||||||
};
|
UserId = _profileForm.UserId,
|
||||||
_dmForm.OnClose += DirectMessage_OnClose;
|
Username = _profileForm.Username,
|
||||||
_dmForm.OnSend += DirectMessage_OnSend;
|
ProfileImage = _imgFactory.GetAndCreateProfileImage(_profileForm.UserId, -1, _userInfo.Data.ProfileCosmeticId),
|
||||||
|
};
|
||||||
|
_dmForm.OnClose += DirectMessage_OnClose;
|
||||||
|
_dmForm.OnSend += DirectMessage_OnSend;
|
||||||
|
|
||||||
_dmForm.Show();
|
_dmForm.Show();
|
||||||
OpenDirectMessagesForms.Add(_dmForm);
|
OpenDirectMessagesForms.Add(_dmForm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -406,6 +410,7 @@ namespace qtcnet_client
|
|||||||
_profile.ProfileImage = _imgFactory.GetAndCreateProfileImage(_user.Data.Id, _user.Data.Status, _user.Data.ProfileCosmeticId);
|
_profile.ProfileImage = _imgFactory.GetAndCreateProfileImage(_user.Data.Id, _user.Data.Status, _user.Data.ProfileCosmeticId);
|
||||||
|
|
||||||
_profile.OnClose += ProfileForm_OnClose;
|
_profile.OnClose += ProfileForm_OnClose;
|
||||||
|
_profile.OnMessageClicked += ProfileForm_OnMessageClicked;
|
||||||
|
|
||||||
OpenProfileForms.Add(_profile);
|
OpenProfileForms.Add(_profile);
|
||||||
_profile.Show();
|
_profile.Show();
|
||||||
@ -876,7 +881,8 @@ namespace qtcnet_client
|
|||||||
{
|
{
|
||||||
ItemId = _itemId,
|
ItemId = _itemId,
|
||||||
ItemName = _ctrl.SelectedStoreItem.Text,
|
ItemName = _ctrl.SelectedStoreItem.Text,
|
||||||
ItemThumbnail = await _imgFactory.GetStoreItemThumb(_itemId)
|
ItemThumbnail = await _imgFactory.GetStoreItemThumb(_itemId),
|
||||||
|
Price = _item.Data.Price,
|
||||||
};
|
};
|
||||||
_itemForm.OnBuyClicked += _itemForm_OnBuyClicked;
|
_itemForm.OnBuyClicked += _itemForm_OnBuyClicked;
|
||||||
|
|
||||||
@ -899,7 +905,7 @@ namespace qtcnet_client
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KryptonMessageBox.Show("Something Went Wrong Buying This Item. Please Try Again Later.", "Uh Oh.");
|
KryptonMessageBox.Show("Something Went Wrong Buying This Item. You May Not Have Enough Q's. Please Try Again Later.", "Uh Oh.");
|
||||||
_form.Close();
|
_form.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user