Skip to content

Commit

Permalink
fix(ui): Remvoed core scroll page up button handling
Browse files Browse the repository at this point in the history
  • Loading branch information
amanCypherock committed Oct 14, 2023
1 parent a844e8b commit 35cd7f4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
12 changes: 1 addition & 11 deletions common/interfaces/user_interface/ui_scroll_page.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,6 @@ static void page_cancel_handler(lv_obj_t *pCancelLvglObj,
lv_key_t keyPressed = lv_indev_get_key(ui_get_indev());
if (LV_KEY_RIGHT == keyPressed) {
lv_group_focus_obj(gp_scrollabe_page_lvgl->p_ui_accept_btn_lvgl);
} else if (LV_KEY_UP == keyPressed) {
lv_group_focus_obj(gp_scrollabe_page_lvgl->p_ui_body_lvgl);
} else if (LV_KEY_LEFT == keyPressed) {
/**
* If the cancel icon is pressed and the user moves joystick to left, we
Expand Down Expand Up @@ -339,11 +337,8 @@ static void page_accept_handler(lv_obj_t *pAcceptLvglObj,

switch (lvglEvent) {
case LV_EVENT_KEY: {
lv_key_t keyPressed = lv_indev_get_key(ui_get_indev());
if (LV_KEY_LEFT == keyPressed) {
if (LV_KEY_LEFT == lv_indev_get_key(ui_get_indev())) {
lv_group_focus_obj(gp_scrollabe_page_lvgl->p_ui_cancel_btn_lvgl);
} else if (LV_KEY_UP == keyPressed) {
lv_group_focus_obj(gp_scrollabe_page_lvgl->p_ui_body_lvgl);
}
break;
}
Expand Down Expand Up @@ -421,11 +416,6 @@ static void page_arrow_handler(lv_obj_t *pLvglArrowObject,
0);
page_update_icons();
}
} else if (LV_KEY_DOWN == keyPressed) {
/* Only focus on accept button if the button is visible */
if (false == gp_scrollabe_page_data->bool_accept_cancel_hidden) {
lv_group_focus_obj(gp_scrollabe_page_lvgl->p_ui_accept_btn_lvgl);
}
}

break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
#include "buzzer.h"
#include "communication.h"
#include "controller_level_four.h"
#include "controller_tap_cards.h"
#include "curves.h"
#include "flash_api.h"
#include "nfc.h"
Expand Down

0 comments on commit 35cd7f4

Please sign in to comment.