From e21116e69d96864d23e1201f13d2cfd4ee6c3069 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 11 Feb 2022 18:00:47 -0500 Subject: [PATCH] Only add _BASEROOM_ to the march list if the number of rooms added to it was zero -- implying that there are no rooms with new messages. --- webcit-ng/static/js/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/webcit-ng/static/js/main.js b/webcit-ng/static/js/main.js index b1275aaff..66131ebf0 100644 --- a/webcit-ng/static/js/main.js +++ b/webcit-ng/static/js/main.js @@ -142,7 +142,12 @@ function load_new_march_list(which_oper) { } return(a.name < b.name); }); - march_list.push({name:"_BASEROOM_",known:true,hasnewmsgs:true,floor:0}); + + // If there are still no rooms with new messages, go to the Lobby. + if (march_list.length == 0) { + march_list.push({name:"_BASEROOM_",known:true,hasnewmsgs:true,floor:0}); + } + console.log(march_list); gotonext(which_oper); } -- 2.39.2