summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/gui/list.c7
-rw-r--r--apps/gui/list.h2
-rw-r--r--apps/menus/main_menu.c3
3 files changed, 1 insertions, 11 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index bb5d1a922e..d15948e97a 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -800,13 +800,6 @@ bool list_do_action(int context, int timeout,
800 return gui_synclist_do_button(lists, action); 800 return gui_synclist_do_button(lists, action);
801} 801}
802 802
803bool gui_synclist_item_is_onscreen(struct gui_synclist *lists,
804 enum screen_type screen, int item)
805{
806 int nb_lines = list_get_nb_lines(lists, screen);
807 return (unsigned)(item - lists->start_item[screen]) < (unsigned) nb_lines;
808}
809
810/* Simple use list implementation */ 803/* Simple use list implementation */
811static int simplelist_line_count = 0, simplelist_line_remaining; 804static int simplelist_line_count = 0, simplelist_line_remaining;
812static int simplelist_line_pos; 805static int simplelist_line_pos;
diff --git a/apps/gui/list.h b/apps/gui/list.h
index b716d8afd9..ede62d7b0a 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -220,8 +220,6 @@ extern void gui_synclist_add_item(struct gui_synclist * lists);
220extern void gui_synclist_del_item(struct gui_synclist * lists); 220extern void gui_synclist_del_item(struct gui_synclist * lists);
221extern void gui_synclist_set_title(struct gui_synclist * lists, const char * title, 221extern void gui_synclist_set_title(struct gui_synclist * lists, const char * title,
222 enum themable_icons icon); 222 enum themable_icons icon);
223extern bool gui_synclist_item_is_onscreen(struct gui_synclist *lists,
224 enum screen_type screen, int item);
225 223
226extern bool gui_synclist_keyclick_callback(int action, void* data); 224extern bool gui_synclist_keyclick_callback(int action, void* data);
227/* 225/*
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c
index 2814c44fe6..03873faac9 100644
--- a/apps/menus/main_menu.c
+++ b/apps/menus/main_menu.c
@@ -441,8 +441,7 @@ static int info_action_callback(int action, struct gui_synclist *lists)
441 else if (action == ACTION_NONE) 441 else if (action == ACTION_NONE)
442 { 442 {
443 static int last_redraw = 0; 443 static int last_redraw = 0;
444 if (gui_synclist_item_is_onscreen(lists, 0, INFO_TIME) 444 if (TIME_AFTER(current_tick, last_redraw + HZ*5))
445 && TIME_AFTER(current_tick, last_redraw + HZ*5))
446 { 445 {
447 last_redraw = current_tick; 446 last_redraw = current_tick;
448 return ACTION_REDRAW; 447 return ACTION_REDRAW;