mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-01 14:19:40 +08:00
feat(core): improve mobile perf (#15317)
#### PR Dependency Tree * **PR #15317** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Virtualized mobile navigation with shell navigation and interactive swipe menus; coordinated mobile back handling with interactive phases/state restoration. * Added shared auth request proxy and message-port based token handling across mobile and worker flows. * **Bug Fixes** * Hydrated remote worker error stacks for calls and observable errors. * Improved SQLite FTS/indexer and nbstore optional text handling; refined docs-search ref parsing and notification loading/retry. * **Refactor / UX** * Modal focus-preservation and pointer behavior updates; improved mobile menu controls and back gesture plugins. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
import type { PluginListenerHandle } from '@capacitor/core';
|
||||
|
||||
export interface NavigationGesturePlugin {
|
||||
isEnabled: () => Promise<boolean>;
|
||||
enable: () => Promise<void>;
|
||||
disable: () => Promise<void>;
|
||||
addListener(
|
||||
event: 'gesture',
|
||||
listener: (event: {
|
||||
phase: 'begin' | 'progress' | 'commit' | 'cancel';
|
||||
progress: number;
|
||||
}) => void
|
||||
): Promise<PluginListenerHandle>;
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ export interface NbStorePlugin {
|
||||
id: string;
|
||||
indexName: string;
|
||||
docId: string;
|
||||
}) => Promise<{ text: string | null }>;
|
||||
}) => Promise<{ text?: string | null }>;
|
||||
ftsGetMatches: (options: {
|
||||
id: string;
|
||||
indexName: string;
|
||||
|
||||
@@ -2,6 +2,7 @@ import {
|
||||
base64ToUint8Array,
|
||||
uint8ArrayToBase64,
|
||||
} from '@affine/core/modules/workspace-engine';
|
||||
import { normalizeNativeOptional } from '@affine/mobile-shared/nbstore/optional';
|
||||
import {
|
||||
decodePayload,
|
||||
MOBILE_BLOB_FILE_PREFIX,
|
||||
@@ -405,7 +406,7 @@ export const NbStoreNativeDBApis: NativeDBApis = {
|
||||
indexName,
|
||||
docId,
|
||||
});
|
||||
return result.text;
|
||||
return normalizeNativeOptional(result.text);
|
||||
},
|
||||
ftsGetMatches: async function (
|
||||
id: string,
|
||||
|
||||
Reference in New Issue
Block a user