Fix Order Of Operations In StoreItemDisplay
This commit is contained in:
parent
a325a622a5
commit
eb9fd6c8cf
@ -34,6 +34,14 @@ namespace qtc_net_client_2.Forms
|
||||
lblDescription.Text = StoreItem.Description;
|
||||
lblPrice.Text = StoreItem.Price.ToString("N0");
|
||||
|
||||
// does the user already own this item?
|
||||
var ownedItem = await _apiService.GetOwnedStoreItem(StoreItem.Id);
|
||||
if (ownedItem != null && ownedItem.Success && ownedItem.Data != null)
|
||||
{
|
||||
btnBuy.Enabled = false;
|
||||
btnBuy.Text = "Bought";
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
using HttpClient client = new();
|
||||
@ -53,14 +61,6 @@ namespace qtc_net_client_2.Forms
|
||||
{
|
||||
_loggingService.LogString("Store Item Thumbnail Could Not Be Loaded\n" + ex.Message);
|
||||
}
|
||||
|
||||
// does the user already own this item?
|
||||
var ownedItem = await _apiService.GetOwnedStoreItem(StoreItem.Id);
|
||||
if (ownedItem != null && ownedItem.Success && ownedItem.Data != null)
|
||||
{
|
||||
btnBuy.Enabled = false;
|
||||
btnBuy.Text = "Bought";
|
||||
}
|
||||
}
|
||||
|
||||
private async void btnBuy_Click(object sender, EventArgs e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user