收口原生网络查询边界

将 Expo 网络状态查询收口到 HostBridge network 模块

将 Tauri 网络状态查询收口到 HostBridge network 模块

同步原生壳结构门禁、架构文档和共享记忆
This commit is contained in:
2026-06-19 22:08:19 +08:00
parent 177c18ddcd
commit c0940bc790
11 changed files with 87 additions and 12 deletions
@@ -8,7 +8,6 @@ import {
type HostBridgeRequest,
normalizeHostBridgeLocalNotification,
} from '../../../../packages/shared/src/contracts/hostBridge';
import { getMobileNetworkStatus } from '../shell/network';
import { MOBILE_SHELL_HOST_VERSION } from '../shell/runtime';
import { resolveMobileHostCapabilities } from './capabilities';
import {
@@ -43,6 +42,7 @@ import {
openMobileHostBridgeNativePage,
reloadMobileHostBridgeWebView,
} from './navigation';
import { getMobileHostBridgeNetworkStatus } from './network';
let currentShareTarget: unknown = null;
let navigation: MobileHostBridgeNavigation | null = null;
@@ -117,7 +117,7 @@ export async function dispatchMobileHostBridgeRequest(
case 'app.reloadWebView':
return ok(request, reloadMobileHostBridgeWebView(navigation));
case 'network.status':
return ok(request, await getMobileNetworkStatus());
return ok(request, await getMobileHostBridgeNetworkStatus());
case 'clipboard.writeText':
return ok(request, await writeClipboard(request.payload));
case 'clipboard.readText':
@@ -0,0 +1,5 @@
import { getMobileNetworkStatus } from '../shell/network';
export function getMobileHostBridgeNetworkStatus() {
return getMobileNetworkStatus();
}