[apps/settings] Reload the title bar when changing language

Before, the "Settings" title would not be immediately translated into
the new language.
This commit is contained in:
Léa Saviot
2019-02-27 17:12:37 +01:00
committed by Émilie Feral
parent 40c057f0ee
commit d0300c0e7f
7 changed files with 19 additions and 1 deletions

View File

@@ -41,8 +41,10 @@ void LanguageController::viewWillAppear() {
bool LanguageController::handleEvent(Ion::Events::Event event) {
if (event == Ion::Events::OK || event == Ion::Events::EXE) {
GlobalPreferences::sharedGlobalPreferences()->setLanguage((I18n::Language)(selectedRow()+1));
/* We need to reload the whole title bar in order to translate both the
* "Settings" title and the degree preference. */
AppsContainer * myContainer = (AppsContainer * )app()->container();
myContainer->refreshPreferences();
myContainer->reloadTitleBarView();
return true;
}
return false;