迁移手机抽屉脚本到Vite模块
This commit is contained in:
@@ -71,6 +71,8 @@
|
||||
});
|
||||
})();
|
||||
let onlineUsers = {};
|
||||
// 暂时暴露给已迁移的手机抽屉 Vite 模块读取,后续在线名单整体迁移后可移除。
|
||||
window.onlineUsers = onlineUsers;
|
||||
let autoScroll = true;
|
||||
let userBadgeRotationTick = 0;
|
||||
let userListRenderTimer = null;
|
||||
@@ -2805,6 +2807,8 @@
|
||||
window.addEventListener('chat:here', (e) => {
|
||||
const users = e.detail;
|
||||
onlineUsers = {};
|
||||
// onlineUsers 使用 let 重建对象时,需要同步 window 引用给 Vite 模块。
|
||||
window.onlineUsers = onlineUsers;
|
||||
users.forEach(u => {
|
||||
hydrateOnlineUserPayload(u.username, u);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user