themezer: prompt user to download ThemeInjector if not installed on launch.

This commit is contained in:
ITotalJustice
2025-08-02 17:21:07 +01:00
parent 3ebb3bd055
commit 40e4616520
4 changed files with 98 additions and 17 deletions

View File

@@ -69,12 +69,24 @@ private:
void Sort();
void UpdateSubheading();
void DownloadEntries();
private:
std::vector<Entry> m_entries{};
s64 m_index{};
std::unique_ptr<List> m_list{};
};
// creates a popup box on another thread.
void DownloadEntries(const Entry& entry);
// parses the params into entry struct and calls DonwloadEntries
bool Download(const std::string& url, const std::vector<AssetEntry>& assets = {}, const std::string& pre_install_message = {}, const std::string& post_install_message = {});
// calls the above function by pushing the asset to an array.
inline bool Download(const std::string& url, const AssetEntry& asset, const std::string& pre_install_message = {}, const std::string& post_install_message = {}) {
std::vector<AssetEntry> assets;
assets.emplace_back(asset);
return Download(url, assets, pre_install_message, post_install_message);
}
} // namespace sphaira::ui::menu::gh

View File

@@ -169,6 +169,8 @@ private:
option::OptionLong m_sort{INI_SECTION, "sort", 0};
option::OptionLong m_order{INI_SECTION, "order", 0};
option::OptionBool m_nsfw{INI_SECTION, "nsfw", false};
bool m_checked_for_nro{};
};
} // namespace sphaira::ui::menu::themezer