diff --git a/xtrn/DDAreaChoosers/DDMsgAreaChooser.js b/xtrn/DDAreaChoosers/DDMsgAreaChooser.js index 03e7e994ae7ae7336ad93bd7ea6e6c69a9cc1ce7..021683d654a7524f14f27657676721c985e72b48 100644 --- a/xtrn/DDAreaChoosers/DDMsgAreaChooser.js +++ b/xtrn/DDAreaChoosers/DDMsgAreaChooser.js @@ -43,6 +43,9 @@ * 2022-11-04 Eric Oulashin Version 1.31 * Made use of the 'posts' property in msg_area.sub[sub-code] (or msg_area.grp_list.sub_list) * for the number of posts without votes + * 2022-11-07 Eric Oulashin Version 1.32 + * Bug fix for numeric input when choosing a sub-board. Bug fix for getting the number of + * posts with the traditional user interface. */ // TODO: In the area list, the 10,000ths digit (for # posts) is in a different color) @@ -86,8 +89,8 @@ if (system.version_num < 31400) } // Version & date variables -var DD_MSG_AREA_CHOOSER_VERSION = "1.30"; -var DD_MSG_AREA_CHOOSER_VER_DATE = "2022-08-19"; +var DD_MSG_AREA_CHOOSER_VERSION = "1.32"; +var DD_MSG_AREA_CHOOSER_VER_DATE = "2022-11-07"; // Keyboard input key codes var CTRL_H = "\x08"; @@ -781,7 +784,7 @@ function DDMsgAreaChooser_SelectMsgArea_Lightbar(pLevel, pGrpIdx, pSubIdx) console.gotoxy(1, console.screen_rows); console.clearline("\1n"); console.print("\1cChoose group #: \1h"); - var userInput = console.getnum(msg_area.grp_list.length); + var userInput = console.getnum(msgAreaMenu.NumItems()); if (userInput > 0) chosenIdx = userInput - 1; else @@ -1916,7 +1919,7 @@ function DDMsgAreaChooser_GetSubBoardInfo(pGrpIdx, pSubIdx, pSubSubIdx) retObj.subCode = msg_area.grp_list[pGrpIdx].sub_list[pSubIdx].code; // Get the number of messages in the sub-board - var numMsgs = numReadableMsgs(msgBase, msg_area.grp_list[pGrpIdx].sub_list[pSubIdx].code); + var numMsgs = numReadableMsgs(null, msg_area.grp_list[pGrpIdx].sub_list[pSubIdx].code); if (numMsgs > 0) { retObj.numItems = numMsgs; @@ -2925,6 +2928,18 @@ function numReadableMsgs(pMsgbase, pSubBoardCode) // Just return the total number of messages.. This isn't accurate, but it's fast. return pMsgbase.total_msgs; } + else if (pMsgbase === null) + { + var numMsgs = 0; + var msgBase = new MsgBase(pSubBoardCode); + if (msgBase.open()) + { + // Just return the total number of messages.. This isn't accurate, but it's fast. + numMsgs = msgBase.total_msgs; + msgBase.close(); + } + return numMsgs; + } else return 0; diff --git a/xtrn/DDAreaChoosers/readme.txt b/xtrn/DDAreaChoosers/readme.txt index 96252de30f60371639fb1d0164a012e842174238..bb63d83736642621e067d501949b11aa8d2a4259 100644 --- a/xtrn/DDAreaChoosers/readme.txt +++ b/xtrn/DDAreaChoosers/readme.txt @@ -1,6 +1,6 @@ Digital Distortion Area Choosers - Version 1.31/1.30 - Release date: 2022-11-04 + Version 1.32/1.30 + Release date: 2022-11-07 by diff --git a/xtrn/DDAreaChoosers/revision_history.txt b/xtrn/DDAreaChoosers/revision_history.txt index 2d8e3f17c19c4a2cc7a92faaa8b54c47ddc339fe..45a4cceeee4abc8bcd1aeb759293de3a85c4d7ec 100644 --- a/xtrn/DDAreaChoosers/revision_history.txt +++ b/xtrn/DDAreaChoosers/revision_history.txt @@ -5,6 +5,9 @@ Revision History (change log) ============================= Version Date Description ------- ---- ----------- +1.32 2022-11-07 Message area chooser only: Bug fix for numeric input when + choosing a sub-board. Bug fix for getting the number of + posts with the traditional user interface. 1.31 2022-11-04 Message area chooser only: Made use of the 'posts' property in msg_area.sub[sub-code] (or msg_area.grp_list.sub_list) for the number of posts