}
-// This function is the dispatcher that determines the correct view for a room, and calls the correct renderer.
-function render_room_view() {
+// Clear any drop handlers that might have been set by the previous view
+function clear_drop_handlers() {
+}
- // The view renderer will set its own room navigation buttons
+
+// Clear the top bar navigation buttons. The view renderer will set its own buttons.
+function clear_navigation_buttons() {
for (const d of ["ctdl-newmsg-button", "ctdl-ungoto-button", "ctdl-skip-button", "ctdl-goto-button", "ctdl-delete-button"]) {
document.getElementById(d).style.display = "none";
}
+}
+
+// This function is the dispatcher that determines the correct view for a room, and calls the correct renderer.
+function render_room_view() {
+
+ clear_navigation_buttons();
clear_sidebar_selection();
+ clear_drop_handlers();
+
document.getElementById("ctdl-main").innerHTML =
"<div class=\"ctdl-middle\">"
+ _("Loading messages from server, please wait")