From a325a622a58de597425596e380ab05e2500f96f8 Mon Sep 17 00:00:00 2001 From: AlanMoonbase Date: Fri, 11 Jul 2025 11:02:10 -0700 Subject: [PATCH] Check If User Already Owns The Item Requested --- qtc-net-client-2/Forms/StoreItemDisplay.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qtc-net-client-2/Forms/StoreItemDisplay.cs b/qtc-net-client-2/Forms/StoreItemDisplay.cs index 02fc414..4398443 100644 --- a/qtc-net-client-2/Forms/StoreItemDisplay.cs +++ b/qtc-net-client-2/Forms/StoreItemDisplay.cs @@ -53,6 +53,14 @@ 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)