收口移动通知响应边界
将 Expo 本地通知成功响应包装收口到 notifications 模块 让移动 dispatch 只委托本地通知请求 同步移动壳配置门禁和共享记忆
This commit is contained in:
@@ -1543,7 +1543,8 @@ if (
|
||||
}
|
||||
|
||||
if (
|
||||
!dispatchSource.includes('showMobileHostBridgeLocalNotification(request.payload)') ||
|
||||
!dispatchSource.includes('showMobileHostBridgeLocalNotification(request)') ||
|
||||
dispatchSource.includes('ok(request, await showMobileHostBridgeLocalNotification') ||
|
||||
dispatchSource.includes('normalizeHostBridgeLocalNotification') ||
|
||||
dispatchSource.includes("from 'expo-notifications'") ||
|
||||
dispatchSource.includes('Notifications.scheduleNotificationAsync') ||
|
||||
@@ -1556,9 +1557,12 @@ if (
|
||||
}
|
||||
for (const notificationSnippet of [
|
||||
'showMobileHostBridgeLocalNotification',
|
||||
'normalizeHostBridgeLocalNotification(payload)',
|
||||
'type HostBridgeRequest',
|
||||
'request: HostBridgeRequest',
|
||||
'normalizeHostBridgeLocalNotification(request.payload)',
|
||||
"invalidRequest('title is required')",
|
||||
'showMobileLocalNotification(notification)',
|
||||
'ok(request, true)',
|
||||
]) {
|
||||
if (!notificationsSource.includes(notificationSnippet)) {
|
||||
throw new Error(`mobile shell notifications module is missing ${notificationSnippet}`);
|
||||
|
||||
Reference in New Issue
Block a user