--- lbbs/src/menu_proc.c 2025/10/13 07:35:48 1.35 +++ lbbs/src/menu_proc.c 2025/10/17 01:25:08 1.39 @@ -15,6 +15,7 @@ ***************************************************************************/ #include "article_cache.h" +#include "article_favor_display.h" #include "article_view_log.h" #include "bbs.h" #include "bbs_cmd.h" @@ -211,7 +212,7 @@ int list_ex_section(void *param) { SECTION_LIST *p_section; - p_section = section_list_find_by_name(param, NULL); + p_section = section_list_find_by_name(param); if (p_section == NULL) { log_error("Section %s not found\n", (const char *)param); @@ -236,7 +237,7 @@ int show_top10_menu(void *param) return NOREDRAW; } show_top10 = 1; - + clearscr(); show_top("", BBS_name, ""); show_bottom(""); @@ -247,20 +248,27 @@ int show_top10_menu(void *param) { iflush(); ch = igetch(100); + + if (ch != KEY_NULL && ch != KEY_TIMEOUT) + { + BBS_last_access_tm = time(NULL); + } + switch (ch) { case KEY_NULL: // broken pipe + log_error("KEY_NULL\n"); show_top10 = 0; return 0; case KEY_TIMEOUT: if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME) { + log_error("User input timeout\n"); show_top10 = 0; return 0; } continue; case CR: - igetch_reset(); default: switch (menu_control(&top10_menu, ch)) { @@ -279,15 +287,13 @@ int show_top10_menu(void *param) } } - BBS_last_access_tm = time(NULL); - if (ch == EXITMENU) { break; } } } - + show_top10 = 0; return REDRAW; } @@ -316,9 +322,10 @@ int locate_article(void *param) int favor_topic(void *param) { - clearscr(); - prints("此功能尚未实现"); - press_any_key(); + if (article_favor_display(&BBS_article_favor) < 0) + { + log_error("article_favor_display() error\n"); + } return REDRAW; }