aaand its fucked lol

This commit is contained in:
Alan Moon 2025-12-11 16:37:08 -08:00
parent 2bfbf7b204
commit e06a1d9eb4
2 changed files with 7 additions and 7 deletions

View File

@ -25,7 +25,6 @@ namespace qtcnet_client.Factories
Bitmap? img2 = null;
Bitmap img3 = Resources.OfflineIcon;
// get user profile image
var _pfpRes = await _apiService.GetUserProfilePic(userId);
if (_pfpRes.Success && _pfpRes.Data != null)
{
@ -34,16 +33,16 @@ namespace qtcnet_client.Factories
}
// get cosmetic image
if(cosmeticStoreId >= 0)
if (cosmeticStoreId >= 0)
{
var _storeRes = await _apiService.GetStoreItem(cosmeticStoreId);
if(_storeRes.Success && _storeRes.Data != null)
if (_storeRes.Success && _storeRes.Data != null)
{
using var _http = new HttpClient();
using var _httpRes = await _http.GetAsync(_storeRes.Data.AssetUrl);
if (_httpRes.IsSuccessStatusCode)
{
var _imgByes = await _httpRes.Content.ReadAsByteArrayAsync();
var _imgByes = _httpRes.Content.ReadAsByteArrayAsync().GetAwaiter().GetResult();
using var ms = new MemoryStream(_imgByes);
img2 = (Bitmap?)Image.FromStream(ms);
}
@ -51,7 +50,7 @@ namespace qtcnet_client.Factories
}
// set status image
if(!int.IsNegative(status))
if (!int.IsNegative(status))
{
switch (status)
{
@ -83,7 +82,7 @@ namespace qtcnet_client.Factories
g.DrawImage(img2, 0, 0, 139, 138);
}
if(!int.IsNegative(status))
if (!int.IsNegative(status))
{
img3.MakeTransparent();
g.DrawImage(img3, 104, 0, 35, 35);

View File

@ -555,6 +555,7 @@ namespace qtcnet_client
else
{
KryptonMessageBox.Show(res.Message, "Login Error", KryptonMessageBoxButtons.OK, KryptonMessageBoxIcon.Error);
LoginControl?.ToggleControls(true);
}
}
else
@ -1047,7 +1048,7 @@ namespace qtcnet_client
{
case Contact.ContactStatus.AwaitingApprovalFromSelf:
ctrl.Username = $"{user.Data.Username} [Contact Request]";
//AudioService.PlaySoundEffect("sndContactRequest");
_audioService.PlaySoundEffect("sndContactRequest");
break;
case Contact.ContactStatus.Accepted:
ctrl.Username = user.Data.Username;