mirror of
https://github.com/wiiu-env/AromaUpdater.git
synced 2024-11-23 21:29:20 +01:00
Fix package selection on page 2
This commit is contained in:
parent
804fe518e4
commit
9a1cf20366
@ -8,15 +8,15 @@ ApplicationState::eSubState UpdaterState::UpdateShowVersionsMenu(Input *input) {
|
||||
if (selectedOptionX != oldX) {
|
||||
selectedOptionY = 0;
|
||||
} else {
|
||||
proccessMenuNavigationY(input, mTotalPackageCount);
|
||||
auto &curPage = mVersionInfo[selectedOptionX];
|
||||
proccessMenuNavigationY(input, curPage.getPackagesCount(mOnlyRequired));
|
||||
}
|
||||
|
||||
int32_t offset = 0;
|
||||
bool stop = false;
|
||||
if (entrySelected(input)) {
|
||||
for (auto &base : mVersionInfo) {
|
||||
if (stop) { break; }
|
||||
for (auto &cat : base.getMutableCategory()) {
|
||||
auto &curPage = mVersionInfo[selectedOptionX];
|
||||
for (auto &cat : curPage.getMutableCategory()) {
|
||||
if (stop) { break; }
|
||||
for (auto &package : cat.getMutablePackages()) {
|
||||
if (!package.getRequired() && mOnlyRequired) {
|
||||
@ -31,7 +31,6 @@ ApplicationState::eSubState UpdaterState::UpdateShowVersionsMenu(Input *input) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (buttonPressed(input, Input::BUTTON_PLUS)) {
|
||||
uint32_t countValid = 0;
|
||||
|
@ -454,6 +454,14 @@ namespace VersionCheck {
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
const size_t getPackagesCount(bool required) const {
|
||||
size_t result = 0;
|
||||
for (auto &cur : category) {
|
||||
result += cur.getPackagesCount(required);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
using VersionInfo = std::vector<BaseCategory>;
|
||||
|
Loading…
Reference in New Issue
Block a user