Skip to content

Commit

Permalink
Bring back the arousal chart
Browse files Browse the repository at this point in the history
  • Loading branch information
MauAbata committed Feb 23, 2024
1 parent fdeb3c3 commit 6051860
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ui/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ static SemaphoreHandle_t _insert_mutex = NULL;
void ui_menu_cb_open_page(
const ui_menu_t* m, const ui_menu_item_t* item, UI_MENU_ARG_TYPE menu_arg
) {
if (item == NULL) return;
const ui_page_t* page = (const ui_page_t*)item->arg;
ui_open_page(page, NULL);
ui_close_all_menu();
}

void ui_menu_cb_open_menu(
Expand Down Expand Up @@ -178,7 +182,9 @@ ui_menu_item_t* ui_menu_add_item(
}

ui_menu_item_t* ui_menu_add_page(const ui_menu_t* m, const ui_page_t* page) {
return NULL;
if (m == NULL || page == NULL) return NULL;

return ui_menu_add_item(m, _(page->title), ui_menu_cb_open_page, (void*)page);
}

ui_menu_item_t* ui_menu_add_menu(const ui_menu_t* m, const ui_menu_t* menu) {
Expand Down

0 comments on commit 6051860

Please sign in to comment.