收口原生网络查询边界
将 Expo 网络状态查询收口到 HostBridge network 模块 将 Tauri 网络状态查询收口到 HostBridge network 模块 同步原生壳结构门禁、架构文档和共享记忆
This commit is contained in:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user