power exit into settings [ci skip]

This commit is contained in:
MX
2026-02-12 18:34:37 +03:00
parent bc6b0d199e
commit ab8261e140

View File

@@ -27,7 +27,7 @@ void power_settings_scene_power_off_on_enter(void* context) {
dialog, " I will be\nwaiting for\n you here...", 78, 14, AlignLeft, AlignTop); dialog, " I will be\nwaiting for\n you here...", 78, 14, AlignLeft, AlignTop);
dialog_ex_set_icon(dialog, 14, 10, &I_dolph_cry_49x54); dialog_ex_set_icon(dialog, 14, 10, &I_dolph_cry_49x54);
} }
dialog_ex_set_left_button_text(dialog, "Cancel"); dialog_ex_set_left_button_text(dialog, "Settings");
dialog_ex_set_right_button_text(dialog, "Power Off"); dialog_ex_set_right_button_text(dialog, "Power Off");
dialog_ex_set_result_callback(dialog, power_settings_scene_power_off_dialog_callback); dialog_ex_set_result_callback(dialog, power_settings_scene_power_off_dialog_callback);
dialog_ex_set_context(dialog, app); dialog_ex_set_context(dialog, app);
@@ -42,8 +42,7 @@ bool power_settings_scene_power_off_on_event(void* context, SceneManagerEvent ev
if(event.type == SceneManagerEventTypeCustom) { if(event.type == SceneManagerEventTypeCustom) {
if(event.event == DialogExResultLeft) { if(event.event == DialogExResultLeft) {
if(!scene_manager_previous_scene(app->scene_manager)) { if(!scene_manager_previous_scene(app->scene_manager)) {
scene_manager_stop(app->scene_manager); scene_manager_next_scene(app->scene_manager, PowerSettingsAppSceneStart);
view_dispatcher_stop(app->view_dispatcher);
} }
} else if(event.event == DialogExResultRight) { } else if(event.event == DialogExResultRight) {
power_off(app->power); power_off(app->power);