Skip to content

Commit

Permalink
chore(mobile): disable reference popup on mobile (#8743)
Browse files Browse the repository at this point in the history
  • Loading branch information
L-Sun committed Nov 8, 2024
1 parent c89c980 commit b9e1c11
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import type {
PeekOptions,
PeekViewService as BSPeekViewService,
QuickSearchResult,
ReferenceNodeConfig,
RootBlockConfig,
RootService,
} from '@blocksuite/affine/blocks';
Expand All @@ -57,6 +58,7 @@ import {
PeekViewExtension,
QuickSearchExtension,
ReferenceNodeConfigExtension,
ReferenceNodeConfigIdentifier,
} from '@blocksuite/affine/blocks';
import { type BlockSnapshot, Text } from '@blocksuite/affine/store';
import {
Expand Down Expand Up @@ -567,6 +569,17 @@ export function patchForMobile() {
});
}

// Hide reference popup on mobile.
{
const prev = di.getFactory(ReferenceNodeConfigIdentifier);
di.override(ReferenceNodeConfigIdentifier, provider => {
return {
...prev?.(provider),
hidePopup: true,
} satisfies ReferenceNodeConfig;
});
}

// Disable some toolbar widgets for mobile.
{
di.override(WidgetViewMapIdentifier('affine:page'), () => {
Expand Down

0 comments on commit b9e1c11

Please sign in to comment.