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

Set the current node action value appropriately

Some menu keys may change the node action (e.g. posting a message), make sure
it's set back correctly here.
parent aba43ad9
No related branches found
No related tags found
No related merge requests found
Pipeline #9032 passed
...@@ -63,6 +63,7 @@ if(argv.indexOf('-?') >= 0 || argv.indexOf('-help') >= 0) ...@@ -63,6 +63,7 @@ if(argv.indexOf('-?') >= 0 || argv.indexOf('-help') >= 0)
exit(0); exit(0);
} }
require('sbbsdefs.js', 'LEN_ALIAS'); require('sbbsdefs.js', 'LEN_ALIAS');
require('nodedefs.js', 'NODE_RMSG');
require("utf8_cp437.js", 'utf8_cp437'); require("utf8_cp437.js", 'utf8_cp437');
require("file_size.js", 'file_size_str'); require("file_size.js", 'file_size_str');
require("html2asc.js", 'html2asc'); require("html2asc.js", 'html2asc');
...@@ -72,6 +73,8 @@ load('822header.js'); ...@@ -72,6 +73,8 @@ load('822header.js');
var hexdump = load('hexdump_lib.js'); var hexdump = load('hexdump_lib.js');
var mimehdr = load('mimehdr.js'); var mimehdr = load('mimehdr.js');
var node_action = NODE_RMSG;
const age = load('age.js'); const age = load('age.js');
var color_cfg = { var color_cfg = {
...@@ -474,6 +477,8 @@ function view_msg(msgbase, msg, lines, total_msgs, grp_name, sub_name, is_operat ...@@ -474,6 +477,8 @@ function view_msg(msgbase, msg, lines, total_msgs, grp_name, sub_name, is_operat
if(!update_msg_attr(msgbase, msg, msg.attr |= MSG_READ)) if(!update_msg_attr(msgbase, msg, msg.attr |= MSG_READ))
alert("failed to add read attribute"); alert("failed to add read attribute");
} }
bbs.node_action = node_action;
bbs.nodesync(/* clearline: */false);
// Only message text nav keys are handled here // Only message text nav keys are handled here
var key = console.getkeys(total_msgs, K_UPPER|K_NOCRLF); var key = console.getkeys(total_msgs, K_UPPER|K_NOCRLF);
switch(key) { switch(key) {
...@@ -1015,6 +1020,7 @@ function list_msgs(msgbase, list, current, preview, grp_name, sub_name) ...@@ -1015,6 +1020,7 @@ function list_msgs(msgbase, list, current, preview, grp_name, sub_name)
} }
console.mnemonics(cmds.join(", ") + format(fmt, list_formats.length-1)); console.mnemonics(cmds.join(", ") + format(fmt, list_formats.length-1));
console.cleartoeol(); console.cleartoeol();
bbs.node_action = node_action;
bbs.nodesync(/* clearline: */false); bbs.nodesync(/* clearline: */false);
// console.mouse_mode = 1<<1; // console.mouse_mode = 1<<1;
var key = console.getkey(); var key = console.getkey();
...@@ -1870,15 +1876,19 @@ if(msgbase.cfg) { ...@@ -1870,15 +1876,19 @@ if(msgbase.cfg) {
switch(which) { switch(which) {
case MAIL_YOUR: case MAIL_YOUR:
sub_name = "Inbox"; sub_name = "Inbox";
node_action = NODE_RMAL;
break; break;
case MAIL_SENT: case MAIL_SENT:
sub_name = "Sent"; sub_name = "Sent";
node_action = NODE_RSML;
break; break;
case MAIL_ALL: case MAIL_ALL:
sub_name = "All"; sub_name = "All";
node_action = NODE_SYSP;
break; break;
case MAIL_ANY: case MAIL_ANY:
sub_name = "Any"; sub_name = "Any";
node_action = NODE_RMAL;
break; break;
default: default:
sub_name = String(which); sub_name = String(which);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment