[FL-1543] Scene manager search scene API (#611)
* scene_manager: search -> search_and_switch_to previous_scene * scene_manager: add search and switch to another scene API * scene_manager: Navigation -> Back event
This commit is contained in:
9
applications/storage-settings/scenes/storage-settings-scene-ejected.c
Normal file → Executable file
9
applications/storage-settings/scenes/storage-settings-scene-ejected.c
Normal file → Executable file
@@ -40,12 +40,13 @@ bool storage_settings_scene_unmounted_on_event(void* context, SceneManagerEvent
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
switch(event.event) {
|
||||
case DialogExResultLeft:
|
||||
consumed =
|
||||
scene_manager_search_previous_scene(app->scene_manager, StorageSettingsStart);
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
app->scene_manager, StorageSettingsStart);
|
||||
break;
|
||||
}
|
||||
} else if(event.type == SceneManagerEventTypeNavigation) {
|
||||
consumed = scene_manager_search_previous_scene(app->scene_manager, StorageSettingsStart);
|
||||
} else if(event.type == SceneManagerEventTypeBack) {
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
app->scene_manager, StorageSettingsStart);
|
||||
}
|
||||
|
||||
return consumed;
|
||||
|
9
applications/storage-settings/scenes/storage-settings-scene-formatting.c
Normal file → Executable file
9
applications/storage-settings/scenes/storage-settings-scene-formatting.c
Normal file → Executable file
@@ -60,12 +60,13 @@ bool storage_settings_scene_formatting_on_event(void* context, SceneManagerEvent
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
switch(event.event) {
|
||||
case DialogExResultLeft:
|
||||
consumed =
|
||||
scene_manager_search_previous_scene(app->scene_manager, StorageSettingsStart);
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
app->scene_manager, StorageSettingsStart);
|
||||
break;
|
||||
}
|
||||
} else if(event.type == SceneManagerEventTypeNavigation) {
|
||||
consumed = scene_manager_search_previous_scene(app->scene_manager, StorageSettingsStart);
|
||||
} else if(event.type == SceneManagerEventTypeBack) {
|
||||
consumed = scene_manager_search_and_switch_to_previous_scene(
|
||||
app->scene_manager, StorageSettingsStart);
|
||||
}
|
||||
|
||||
return consumed;
|
||||
|
Reference in New Issue
Block a user