Skip to content

Commit

Permalink
dry up sam_present call to save ui state
Browse files Browse the repository at this point in the history
  • Loading branch information
bettse committed Jul 27, 2024
1 parent 5643b32 commit 6002037
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions scenes/seader_scene_sam_present.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,24 +81,18 @@ bool seader_scene_sam_present_on_event(void* context, SceneManagerEvent event) {
bool consumed = false;

if(event.type == SceneManagerEventTypeCustom) {
scene_manager_set_scene_state(seader->scene_manager, SeaderSceneSamPresent, event.event);

if(event.event == SubmenuIndexReadPicopass) {
scene_manager_set_scene_state(
seader->scene_manager, SeaderSceneSamPresent, SubmenuIndexReadPicopass);
scene_manager_next_scene(seader->scene_manager, SeaderSceneReadPicopass);
consumed = true;
} else if(event.event == SubmenuIndexRead14a) {
scene_manager_set_scene_state(
seader->scene_manager, SeaderSceneSamPresent, SubmenuIndexRead14a);
scene_manager_next_scene(seader->scene_manager, SeaderSceneRead14a);
consumed = true;
} else if(event.event == SubmenuIndexReadMfc) {
scene_manager_set_scene_state(
seader->scene_manager, SeaderSceneSamPresent, SubmenuIndexReadMfc);
scene_manager_next_scene(seader->scene_manager, SeaderSceneReadMfc);
consumed = true;
} else if(event.event == SubmenuIndexSamInfo) {
scene_manager_set_scene_state(
seader->scene_manager, SeaderSceneSamPresent, SubmenuIndexSamInfo);
scene_manager_next_scene(seader->scene_manager, SeaderSceneSamInfo);
consumed = true;
} else if(event.event == SubmenuIndexSaved) {
Expand Down

0 comments on commit 6002037

Please sign in to comment.