收口移动壳通知桥接边界
将 Expo 本地通知 payload 归一收口到 notifications 模块 让移动壳 dispatch 只委托通知 HostBridge 请求 同步移动壳结构门禁、架构文档和共享记忆
This commit is contained in:
@@ -1529,7 +1529,8 @@ if (
|
||||
}
|
||||
|
||||
if (
|
||||
!dispatchSource.includes('showMobileLocalNotification(notification)') ||
|
||||
!dispatchSource.includes('showMobileHostBridgeLocalNotification(request.payload)') ||
|
||||
dispatchSource.includes('normalizeHostBridgeLocalNotification') ||
|
||||
dispatchSource.includes("from 'expo-notifications'") ||
|
||||
dispatchSource.includes('Notifications.scheduleNotificationAsync') ||
|
||||
dispatchSource.includes('Notifications.requestPermissionsAsync') ||
|
||||
@@ -1539,6 +1540,16 @@ if (
|
||||
'mobile shell dispatch must delegate local notification delivery to notifications.ts',
|
||||
);
|
||||
}
|
||||
for (const notificationSnippet of [
|
||||
'showMobileHostBridgeLocalNotification',
|
||||
'normalizeHostBridgeLocalNotification(payload)',
|
||||
"invalidRequest('title is required')",
|
||||
'showMobileLocalNotification(notification)',
|
||||
]) {
|
||||
if (!notificationsSource.includes(notificationSnippet)) {
|
||||
throw new Error(`mobile shell notifications module is missing ${notificationSnippet}`);
|
||||
}
|
||||
}
|
||||
|
||||
for (const snippet of [
|
||||
'file.exportText',
|
||||
|
||||
Reference in New Issue
Block a user