Skip to content

Commit

Permalink
do not repower if language doesn't changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ligenxxxx committed Nov 13, 2024
1 parent 884f53a commit daf7566
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lang/simplified_chinese.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ translate_t translate_simplified_chinese[TRANSLATE_STRING_NUM] = {
{"English", "英语"},
{"Simplified Chinese", "简体中文"},
{"Set Language", "设置语言"},
{"Language has been changed.\nPlease repower goggle now.", "语言已修改.\n现在请重启眼镜"},
{"Language has been changed.\nPlease repower goggle now.", "语言已修改.\n现在请重启眼镜."},
{"Goggle", "眼镜"},

// focus chart
Expand Down
8 changes: 5 additions & 3 deletions src/ui/page_version.c
Original file line number Diff line number Diff line change
Expand Up @@ -1036,9 +1036,11 @@ static void page_version_on_click(uint8_t key, int sel) {
dropdown_lang_is_opened = false;
pp_version.p_arr.max = ROW_COUNT; // enable roller operation on input_device.c
uint16_t selected = lv_dropdown_get_selected(dropdown_lang);
ini_putl("language", "lang", selected, SETTING_INI);
lv_obj_clear_flag(msgbox_language_changed, LV_OBJ_FLAG_HIDDEN);
app_state_push(APP_STATE_USER_INPUT_DISABLED);
if (selected != g_setting.language.lang) {
ini_putl("language", "lang", selected, SETTING_INI);
lv_obj_clear_flag(msgbox_language_changed, LV_OBJ_FLAG_HIDDEN);
app_state_push(APP_STATE_USER_INPUT_DISABLED);
}
} else {
lv_dropdown_open(dropdown_lang);
lv_obj_add_style(dropdown_lang, &style_dropdown, LV_PART_MAIN);
Expand Down

0 comments on commit daf7566

Please sign in to comment.