Files
Upsilon/apps/settings/sub_menu/localization_controller.cpp
Gabriel Ozouf 64e7057d50 [apps/on_boarding] Remember language choice
When choosing a language and then pressing back from the country menu to
get back to the language menu, the previously selected language remains
selected.

Change-Id: I018c51cce09d47b15bb4864c135d381a94b2a72f
2020-11-04 15:33:00 +01:00

22 lines
613 B
C++

#include "localization_controller.h"
#include <apps/global_preferences.h>
namespace Settings {
int LocalizationController::indexOfCellToSelectOnReset() const {
return mode() == Mode::Language ?
Shared::LocalizationController::indexOfCellToSelectOnReset() :
IndexOfCountry(GlobalPreferences::sharedGlobalPreferences()->country());
}
bool LocalizationController::handleEvent(Ion::Events::Event event) {
if (Shared::LocalizationController::handleEvent(event) || event == Ion::Events::Left) {
static_cast<StackViewController *>(parentResponder())->pop();
return true;
}
return false;
}
}