补充前端状态和安全边界注释
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user