补充前端状态和安全边界注释

This commit is contained in:
2026-04-25 10:10:47 +08:00
parent 283793bc1c
commit c8bc81f961
5 changed files with 7 additions and 0 deletions
+2
View File
@@ -4,6 +4,7 @@ import { escapeHtml } from "./html.js";
import { renderRoomsOnlineStatusToContainer } from "./rooms.js";
let mobileDrawerEventsBound = false;
// 模块级状态用于维持抽屉互斥、搜索 RAF 节流和房间列表短缓存。
let mobileDrawerOpen = null;
let mobileUserListRenderTimer = null;
let mobileRoomsOnlineStatusCache = null;
@@ -226,6 +227,7 @@ export async function loadMobileRoomList() {
}
if (mobileRoomsOnlineStatusCache && Date.now() - mobileRoomsOnlineStatusCacheAt < MOBILE_ROOMS_ONLINE_STATUS_CACHE_TTL) {
// 切换手机房间 tab 可能高频触发,10 秒短缓存用来减少接口压力,允许轻微延迟。
renderMobileRoomList(mobileRoomsOnlineStatusCache, container);
return;
}