Skip to content

Commit 3a3ad11

Browse files
authored
Merge pull request #361 from csfloat/fix/restore-stall-cache
Minimize Forced Refreshes for Stall
2 parents ca401b5 + f6e3d29 commit 3a3ad11

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/lib/components/inventory/selected_item_info.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,14 +308,14 @@ export class SelectedItemInfo extends FloatElement {
308308

309309
// If an item was listed, refresh the stall data
310310
if (e.detail?.listingId) {
311-
this.refreshStallData();
311+
this.refreshStallData(true);
312312
}
313313
}
314314

315-
private refreshStallData() {
315+
private refreshStallData(forceRefresh = false) {
316316
if (g_ActiveInventory?.m_owner?.strSteamId) {
317317
gStallFetcher
318-
.fetch({steam_id64: g_ActiveInventory.m_owner.strSteamId}, true)
318+
.fetch({steam_id64: g_ActiveInventory.m_owner.strSteamId}, forceRefresh)
319319
.then((stall) => (this.stall = stall))
320320
.catch((error) => {
321321
console.error('Failed to refresh stall data:', error);

0 commit comments

Comments
 (0)