From 3e46790a005fa0d3a7ebf7b893c9a499ea2e0a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 22 Oct 2026 08:52:16 +0200 Subject: [PATCH] Store: Make Retry download the listing again It only recreated the views, which showed the same connection error. Co-Authored-By: Claude Opus 5.5 (1M context) --- UI/Store.cpp | 6 ++++++ UI/Store.h | 1 + 2 files changed, 7 insertions(+) diff --git a/UI/Store.cpp b/UI/Store.cpp index 83e401ebfd..ab2f300dcf 100644 --- a/UI/Store.cpp +++ b/UI/Store.cpp @@ -354,7 +354,12 @@ void ProductView::OnLaunchClick(UI::EventParams &e) { StoreScreen::StoreScreen() : UISimpleBaseDialogScreen(Path(), SimpleDialogFlags::Default) { lang_ = g_Config.sLanguageIni; + StartListingDownload(); +} + +void StoreScreen::StartListingDownload() { loading_ = true; + connectionError_ = false; std::string indexPath = StoreBaseUrl() + "index.json"; const char *acceptMime = "application/json, */*; q=0.8"; @@ -532,6 +537,7 @@ void StoreScreen::OnGameLaunch(UI::EventParams &e) { } void StoreScreen::OnRetry(UI::EventParams &e) { + StartListingDownload(); RecreateViews(); } diff --git a/UI/Store.h b/UI/Store.h index 9d31f03560..c6e5b90cda 100644 --- a/UI/Store.h +++ b/UI/Store.h @@ -77,6 +77,7 @@ protected: std::string_view GetTitle() const override; private: + void StartListingDownload(); void ParseListing(const std::string &json); ProductItemView *GetSelectedItem();