From b0ee7b0ea5585f3c0c63be72a0ad1bebeebdfb0c Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Tue, 3 May 2016 11:03:23 +1000 Subject: [PATCH] Additional Fix for message 1 being unread --- mail_menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail_menu.c b/mail_menu.c index 36d5077..6c55465 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -1631,7 +1631,7 @@ int mail_menu(int socket, struct user_record *user) { for (j=i-1;jmsg_count;j++) { localtime_r((time_t *)&msghs->msgs[j]->msg_h->DateWritten, &msg_date); - if (msghs->msgs[j]->msg_no > jlr.HighReadMsg) { + if (msghs->msgs[j]->msg_no > jlr.HighReadMsg || all_unread) { sprintf(buffer, "\e[1;30m[\e[1;34m%4d\e[1;30m]\e[1;32m*\e[1;37m%-25.25s \e[1;32m%-15.15s \e[1;33m%-15.15s \e[1;35m%02d:%02d %02d-%02d-%02d\e[0m\r\n", j + 1, msghs->msgs[j]->subject, msghs->msgs[j]->from, msghs->msgs[j]->to, msg_date.tm_hour, msg_date.tm_min, msg_date.tm_mday, msg_date.tm_mon + 1, msg_date.tm_year - 100); } else { sprintf(buffer, "\e[1;30m[\e[1;34m%4d\e[1;30m] \e[1;37m%-25.25s \e[1;32m%-15.15s \e[1;33m%-15.15s \e[1;35m%02d:%02d %02d-%02d-%02d\e[0m\r\n", j + 1, msghs->msgs[j]->subject, msghs->msgs[j]->from, msghs->msgs[j]->to, msg_date.tm_hour, msg_date.tm_min, msg_date.tm_mday, msg_date.tm_mon + 1, msg_date.tm_year - 100);