From: Art Cancro Date: Fri, 11 Feb 2022 23:00:47 +0000 (-0500) Subject: Only add _BASEROOM_ to the march list if the number of rooms added X-Git-Tag: v950~19 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=e21116e69d96864d23e1201f13d2cfd4ee6c3069;p=citadel.git 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. --- 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); }