fix(island): 修好"非紧急叫人 / 紧急叫人收起 / 设置页预览"三处点不开,并让胶囊汇总通知类型
用户反馈的三个场景: 1) 非紧急叫人(HIGH + kind=call)—— 上课时段原先只进队列、屏幕上看不到东西, 自然"无法点开"。现在:上课时段仍以**胶囊**保持可见(不自动展开、不打断课堂), 点一下即可展开详情;下课自动展开。新增 isOpenable():紧急消息与"任何叫人"都允许点开。 2) 紧急叫人点击缩回后点不开 —— 归因于固定包围盒窗口的命中丢失(上一轮已改为光标兜底轮询), 本轮补上"展开 → 收起 → 再次展开"的叫人类专项回归。 3) 设置页"预览效果"示例岛无法正常展开 —— 预览通知现在走 preview 通道:直接展开、 失焦不收起(用户拖滑块时主窗口一直是焦点)、30 秒后自行消失、点"知道了"不留残影。 顺带修掉两个真问题: - pushNotification 在"胶囊态"收到新消息时会把上一条静默顶掉(只有展开态才回队); 现在只要换了当前展示的消息,上一条一律回队列 —— 否则类型汇总与"还有 N 条"都会漏。 - syncWindow 的上课时段守卫只认"紧急",导致普通叫人被 hideImmediately 藏掉;改用 isOpenable。 胶囊类型汇总(用户要求):多条未处理消息时收起态显示 「新消息:叫人/作业/通知(共 3 条)」+「点击查看」,并把三种类型做成小标签; 单条时仍显示类型名(新作业 / 老师叫你 / 新消息)。 性能:岛体矩形上报加限流(~10 次/秒,尾随补发最终形态),修掉"每帧 IPC + 每帧读光标" 导致的渲染变慢(实测会让开合采样从 57 帧掉到 4 帧)。 验证:verify:desktop 71/71 + 离线复跑 65/65;typecheck/lint 全绿。
This commit is contained in:
1 parent
d8b0eb05c2
commit
86430c5f4a
5 files changed
+353
-35
No files matched your search
@@ -160,7 +160,7 @@ async function resetIslandAppearance(): Promise<void> {
|
||||
await saveIslandAppearance();
|
||||
}
|
||||
|
||||
/** 本地推一条测试通知,立刻确认外观效果 */
|
||||
/** 本地推一条测试通知,立刻确认外观效果(预览模式:直接展开、失焦不收起、30 秒后自动消失) */
|
||||
function testIsland(): void {
|
||||
window.desktop?.islandPush?.({
|
||||
notification: {
|
||||
@@ -172,7 +172,7 @@ function testIsland(): void {
|
||||
courseName: null,
|
||||
teacherName: '本地预览',
|
||||
},
|
||||
context: { inClass: false, currentPeriodEnd: null },
|
||||
context: { inClass: false, currentPeriodEnd: null, preview: true },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user