Skip to content
Snippets Groups Projects
Commit 939e06b8 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Set the MSG_READ attribute on read-email immediately upon reading

Mail wasn't being marked as read unless the user hit 'Q' from the msg view mode.
Reported by Keyop via IRC.
parent f22f8591
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1350 passed
......@@ -448,6 +448,10 @@ function view_msg(msgbase, msg, lines, total_msgs, grp_name, sub_name, is_operat
, sub_name
, msg.num
, total_msgs));
if((msgbase.attributes & SMB_EMAIL) && !(msg.attr&MSG_READ) && (msg.to_ext == user.number)) {
if(!update_msg_attr(msgbase, msg, msg.attr |= MSG_READ))
alert("failed to add read attribute");
}
// Only message text nav keys are handled here
var key = console.getkeys(total_msgs, K_UPPER|K_NOCRLF);
switch(key) {
......@@ -1129,14 +1133,6 @@ function list_msgs(msgbase, list, current, preview, grp_name, sub_name)
viewed_msg = current;
}
}
if(list[current]) {
var msg = list[current];
if(mail && msg.to_ext == user.number) {
if(!update_msg_attr(msgbase, msg, msg.attr | MSG_READ))
alert("failed to add read attribute");
}
}
break;
case 'D':
console.clearline();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment