* 回放缓存的进入事件(仅保留最新一条)
()
| 216 | * 回放缓存的进入事件(仅保留最新一条) |
| 217 | */ |
| 218 | function replayPendingPluginEnterIfNeeded() { |
| 219 | if (!enterCallback || !pendingEnterPayload) return |
| 220 | const replayPayload = pendingEnterPayload |
| 221 | const replayMeta = pendingEnterMeta |
| 222 | // 清空后再异步回放,避免重复触发 |
| 223 | pendingEnterPayload = null |
| 224 | pendingEnterMeta = null |
| 225 | console.log('[PluginRuntime][Enter] replay-pending', replayMeta || {}) |
| 226 | queueMicrotask(() => { |
| 227 | dispatchPluginEnter(replayPayload) |
| 228 | }) |
| 229 | } |
| 230 | |
| 231 | // 获取操作系统类型 |
| 232 | const osType = electron.ipcRenderer.sendSync('get-os-type') |
no test coverage detected