[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
This commit is contained in:
Gabriel Ozouf
2020-09-25 11:52:04 +02:00
committed by Émilie Feral
parent 54c28fc87f
commit 64e7057d50
4 changed files with 8 additions and 3 deletions

View File

@@ -142,6 +142,11 @@ void LocalizationController::setMode(LocalizationController::Mode mode) {
m_contentView.modeHasChanged();
}
int LocalizationController::indexOfCellToSelectOnReset() const {
assert(mode() == Mode::Language);
return static_cast<int>(GlobalPreferences::sharedGlobalPreferences()->language());
}
const char * LocalizationController::title() {
if (mode() == Mode::Language) {
return I18n::translate(I18n::Message::Language);