From 5861947e2acaab2d041d7906dc5afab50d667fc2 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sun, 21 Aug 2016 09:29:58 +1000 Subject: [PATCH] misc last read fixes --- mail_menu.c | 2 +- www_msgs.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mail_menu.c b/mail_menu.c index 2589ee6..41ab33f 100644 --- a/mail_menu.c +++ b/mail_menu.c @@ -776,7 +776,7 @@ void read_message(struct user_record *user, struct msg_headers *msghs, int mailn jlr.HighReadMsg = msghs->msgs[mailno]->msg_no; } - jlr.LastReadMsg = mailno; + jlr.LastReadMsg = msghs->msgs[mailno]->msg_no; if (jlr.HighReadMsg < msghs->msgs[mailno]->msg_no) { jlr.HighReadMsg = msghs->msgs[mailno]->msg_no; } diff --git a/www_msgs.c b/www_msgs.c index 87f8c47..b507b35 100644 --- a/www_msgs.c +++ b/www_msgs.c @@ -364,12 +364,12 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i if (JAM_ReadLastRead(jb, user->id, &jlr) == JAM_NO_USER) { jlr.UserCRC = JAM_Crc32(user->loginname, strlen(user->loginname)); jlr.UserID = user->id; - jlr.HighReadMsg = msg; + jlr.HighReadMsg = msg - 1; } - jlr.LastReadMsg = msg; + jlr.LastReadMsg = msg - 1; if (jlr.HighReadMsg < msg) { - jlr.HighReadMsg = msg; + jlr.HighReadMsg = msg - 1; } JAM_WriteLastRead(jb, user->id, &jlr);