Refresh Store On Load

This commit is contained in:
Alan Moon 2025-11-27 13:01:43 -08:00
parent 66eb9b91e8
commit 4bd2f0028f
2 changed files with 17 additions and 19 deletions

View File

@ -113,7 +113,6 @@
tbcMain.SelectedIndex = 0; tbcMain.SelectedIndex = 0;
tbcMain.Size = new Size(352, 499); tbcMain.Size = new Size(352, 499);
tbcMain.TabIndex = 0; tbcMain.TabIndex = 0;
tbcMain.SelectedIndexChanged += tbcMain_SelectedIndexChanged;
// //
// tbpContacts // tbpContacts
// //

View File

@ -367,9 +367,7 @@ namespace qtc_net_client_2
donationWindow.Show(); donationWindow.Show();
} }
private async void tbcMain_SelectedIndexChanged(object sender, EventArgs e) private async Task RefreshStore()
{
if (tbcMain.SelectedIndex == 4)
{ {
// get store items // get store items
var storeItems = await _apiService.GetStoreItems(); var storeItems = await _apiService.GetStoreItems();
@ -390,7 +388,6 @@ namespace qtc_net_client_2
} }
} }
} }
}
private async void ApplyStoreItems(IEnumerable<StoreItem> storeItems) private async void ApplyStoreItems(IEnumerable<StoreItem> storeItems)
{ {
@ -666,6 +663,8 @@ namespace qtc_net_client_2
llblEditProfile.Visible = true; llblEditProfile.Visible = true;
tbcMain.Enabled = true; tbcMain.Enabled = true;
await RefreshStore();
var pfpRes = await _apiService.GetUserProfilePic(_apiService.CurrentUser.Id); var pfpRes = await _apiService.GetUserProfilePic(_apiService.CurrentUser.Id);
var cosmeticRes = await GetCosmeticImage(_apiService.CurrentUser.ActiveProfileCosmetic); var cosmeticRes = await GetCosmeticImage(_apiService.CurrentUser.ActiveProfileCosmetic);