mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
After choosing a language at onboarding, the country menu now has a specific country selected by default (Spain for Spanish, Italy for Italian...) Default countries are specified in apps/language_preferences.csv Change-Id: Ia6392aceb9bebf7e62a692c5a79eb8c4d7b71a9d
22 lines
627 B
C++
22 lines
627 B
C++
#include "localization_controller.h"
|
|
#include <apps/global_preferences.h>
|
|
|
|
|
|
namespace Settings {
|
|
|
|
int LocalizationController::indexOfCellToSelectOnReset() const {
|
|
return mode() == Mode::Language ?
|
|
static_cast<int>(GlobalPreferences::sharedGlobalPreferences()->language()) :
|
|
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;
|
|
}
|
|
|
|
}
|