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();