From 2a15af3059196ce89b326946fa7bdec67747d685 Mon Sep 17 00:00:00 2001 From: flb Date: Mon, 16 May 2022 15:55:12 +0200 Subject: [PATCH] don't show empty lists --- README.md | 1 + resources/i18n/en-US/menus.json | 3 ++- source/app_page.cpp | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 201cfce..ead49fd 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ Copy the `aio-switch-updater/` directory to `/switch/` on your sdcard. ## Extras (in the `Tools` tab) - Reboot to specific payload. +- Consult games with missing updates. - Change software color scheme of Joy-Cons. Additional color profiles can be found in the releases and should be copied to `config/aio-switch-updater/jc_profiles.json`. Use [this webpage](https://hamletdufromage.github.io/JC-color-picker/JCpicker.html) to generate your own profiles. - Change software color scheme of Pro Controllers (has to be paired as Player 1). Additional color profiles can be found in the releases and should be copied to `config/aio-switch-updater/pc_profiles.json`. - Consult installed cheat codes. diff --git a/resources/i18n/en-US/menus.json b/resources/i18n/en-US/menus.json index 569daa1..b454d70 100644 --- a/resources/i18n/en-US/menus.json +++ b/resources/i18n/en-US/menus.json @@ -70,7 +70,8 @@ "cancel": "Cancel", "off": "Off", "selected": "Selected", - "applet_mode_not_supported": "This feature isn't available in applet mode. Please launch AIO-Switch-Updater through title redirection to access it." + "applet_mode_not_supported": "This feature isn't available in applet mode. Please launch AIO-Switch-Updater through title redirection to access it.", + "nothing_to_see": "Nothing to see here!" }, "changelog": { "changelog": "Changelog" diff --git a/source/app_page.cpp b/source/app_page.cpp index 1e98f5e..ac95c6f 100644 --- a/source/app_page.cpp +++ b/source/app_page.cpp @@ -64,6 +64,12 @@ void AppPage::PopulatePage() } delete[] records; + brls::Logger::debug("count {}", list->getViewsCount()); + + if(!list->getViewsCount()) { + list->addView(new brls::Label(brls::LabelStyle::DESCRIPTION, "menus/common/nothing_to_see"_i18n, true)); + } + this->setContentView(list); }