diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f205f07..fe58ac8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,12 +1,19 @@ name: Build AIO-switch-updater -on: [push] +on: + push: + workflow_dispatch: + jobs: AIO-switch-updater: runs-on: ubuntu-latest container: devkitpro/devkita64_devkitarm steps: - uses: actions/checkout@v1 + + - name: update libnx + run: | + sudo pacman -S libnx - name: Update repo. run: | git submodule update --init --recursive diff --git a/include/changelog_page.hpp b/include/changelog_page.hpp index be676fd..a35212f 100644 --- a/include/changelog_page.hpp +++ b/include/changelog_page.hpp @@ -6,7 +6,7 @@ class ChangelogPage : public brls::AppletFrame { private: brls::List* list; - std::vector items; + brls::ListItem* listItem; public: ChangelogPage(); diff --git a/source/changelog_page.cpp b/source/changelog_page.cpp index fb14347..dd26b8d 100644 --- a/source/changelog_page.cpp +++ b/source/changelog_page.cpp @@ -112,12 +112,10 @@ ChangelogPage::ChangelogPage() : AppletFrame(true, true) verTitles.push_back("v2.3.3"); changes.push_back("menus/v2_3_3_text"_i18n ); - int nbVersions = verTitles.size(); - items.reserve(nbVersions); - for(int i = nbVersions -1 ; i >= 0; i--){ - items[i] = new brls::ListItem(verTitles[i]); + for(int i = verTitles.size() -1 ; i >= 0; i--){ + listItem = new brls::ListItem(verTitles[i]); change = changes[i]; - items[i]->getClickEvent()->subscribe([&, change](brls::View* view){ + listItem->getClickEvent()->subscribe([&, change](brls::View* view){ brls::Dialog* dialog = new brls::Dialog(change); brls::GenericEvent::Callback callback = [dialog](brls::View* view) { dialog->close(); @@ -126,7 +124,7 @@ ChangelogPage::ChangelogPage() : AppletFrame(true, true) dialog->setCancelable(true); dialog->open(); }); - list->addView(items[i]); + list->addView(listItem); } this->setContentView(list); } \ No newline at end of file