From 359297dee9fc0f6c2f54dede36dd399521acbdbf Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Tue, 15 Jan 2019 07:04:41 +0000
Subject: [PATCH] Don't load/list the mail index in reverse (newest-first)
 order by default. Unfortunately, the call to readmail() in other places in
 sbbs (e.g. logon.ccp, useredit.cpp) is hard-coded without *out* this loadmail
 flag, so you get an index in oldest-first order when you logon and answer
 "Yes" to the "Read your mail now?" prompt and get the index in reverse
 (newest-first) order when you use the 'R' command from the email prompt which
 is unexpected and likely confusing to users. Until we can replace these
 hard-coded calls to readmail() with scripted logic which can read/ use a
 user-preference property (e.g. from data/user/*.ini), we will just default to
 the old/previous behavior. The user is one key (!) away from reversing the
 index anyway.

---
 exec/email_sec.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/exec/email_sec.js b/exec/email_sec.js
index c620ec3d9b..ee6c764c58 100644
--- a/exec/email_sec.js
+++ b/exec/email_sec.js
@@ -20,10 +20,10 @@ while(bbs.online) {
 	var cmdkeys = "SARUFNKQ?\r";
 	switch(console.getkeys(cmdkeys,K_UPPER)) {
 		case 'R':	// Read your mail
-			bbs.read_mail(MAIL_YOUR, user.number, LM_REVERSE);
+			bbs.read_mail(MAIL_YOUR, user.number);
 			break;
 		case 'U':	// Read your un-read mail
-			bbs.read_mail(MAIL_YOUR, user.number, LM_UNREAD|LM_REVERSE);
+			bbs.read_mail(MAIL_YOUR, user.number, LM_UNREAD);
 			break;
 		case 'K':	// Read/Kill sent mail
 			bbs.read_mail(MAIL_SENT, user.number);
-- 
GitLab