From f15b9739b854e4c2a979cde7c798f75adb353c0a Mon Sep 17 00:00:00 2001
From: Eric Oulashin <nightfox@synchro.net>
Date: Sun, 31 Dec 2023 03:19:05 +0000
Subject: [PATCH] DDMsgReader: With the indexed menu, don't show "No new
 messages" if the indexed menu has already been displayed

---
 xtrn/DDMsgReader/DDMsgReader.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/xtrn/DDMsgReader/DDMsgReader.js b/xtrn/DDMsgReader/DDMsgReader.js
index acdeaff20b..2627080241 100644
--- a/xtrn/DDMsgReader/DDMsgReader.js
+++ b/xtrn/DDMsgReader/DDMsgReader.js
@@ -15512,8 +15512,12 @@ function DigDistMsgReader_IndexedModeChooseSubBoard(pClearScreen, pDrawMenu, pDi
 	if (usingTradInterface)
 		this.indexedModeItemDescWidth -= (numberedModeItemNumWidth+1);
 	this.indexedModeSubBoardMenuSubBoardFormatStr = "%-" + this.indexedModeItemDescWidth + "s %" + numMsgsWidth + "d %" + numNewMsgsWidth + "d %" + lastPostDateWidth + "s";
+	var thisFunctionFirstCall = false; // Whether or not this is the first call of this function
 	if (typeof(this.indexedModeMenu) !== "object")
+	{
+		thisFunctionFirstCall = true;
 		this.indexedModeMenu = this.CreateLightbarIndexedModeMenu(numMsgsWidth, numNewMsgsWidth, lastPostDateWidth, this.indexedModeItemDescWidth, this.indexedModeSubBoardMenuSubBoardFormatStr);
+	}
 	else
 		DigDistMsgReader_IndexedModeChooseSubBoard.selectedItemIdx = this.indexedModeMenu.selectedItemIdx;
 	// Ensure the menu is clear, and (re-)populate the menu with sub-board information w/ # of new messages in each, etc.
@@ -15580,7 +15584,7 @@ function DigDistMsgReader_IndexedModeChooseSubBoard(pClearScreen, pDrawMenu, pDi
 	}
 	// If there are no new messages and the user setting to show the indexed menu when there are no new messages
 	// is disabled, then say so and return.
-	else if (totalNewMsgs == 0 && !this.userSettings.displayIndexedModeMenuIfNoNewMessages)
+	else if (thisFunctionFirstCall && totalNewMsgs == 0 && !this.userSettings.displayIndexedModeMenuIfNoNewMessages)
 	{
 		console.attributes = "N";
 		console.putmsg(bbs.text(QWKNoNewMessages));
-- 
GitLab