49fffbca74
新增平台壳草稿通知和角标 HostBridge 同步层 补充真实 Tauri transport 单测和跳一跳完成集成测试 扩展原生壳门禁覆盖 H5 宿主消费链路 更新宿主壳协议、方案和共享决策记录
23 lines
703 B
TypeScript
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 });
|
|
}
|