Files
Genarrative/src/components/platform-entry/platformHostBridgeSync.ts
T
kdletters 49fffbca74 补齐平台壳宿主消费门禁
新增平台壳草稿通知和角标 HostBridge 同步层

补充真实 Tauri transport 单测和跳一跳完成集成测试

扩展原生壳门禁覆盖 H5 宿主消费链路

更新宿主壳协议、方案和共享决策记录
2026-06-19 03:38:24 +08:00

23 lines
703 B
TypeScript

import {
setHostAppBadgeCount,
showHostLocalNotification,
} from '../../services/host-bridge/hostBridge';
import type { PlatformHostDraftNotification } from './platformHostNotificationModel';
type PlatformHostDraftNotificationPayload = Pick<
PlatformHostDraftNotification,
'title' | 'body'
>;
// 中文注释:平台壳只把已派生出的通知和角标计数交给 HostBridge,不改业务事实。
export function sendPlatformHostDraftNotificationToHost({
title,
body,
}: PlatformHostDraftNotificationPayload) {
return showHostLocalNotification({ title, body });
}
export function syncPlatformHostDraftBadgeCountToHost(count: number) {
return setHostAppBadgeCount({ count });
}