From f58e1149c91995a49c1b991e574e9942990ad449 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Thu, 18 Jan 2024 22:21:47 -0800 Subject: Change handling for mobile --- src/view/screens/Search/Search.tsx | 9 +++++++-- src/view/shell/desktop/Search.tsx | 24 +++++++++++++++++++++++- 2 files changed, 30 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/view/screens/Search/Search.tsx b/src/view/screens/Search/Search.tsx index 612eb5cc1..94aab2d96 100644 --- a/src/view/screens/Search/Search.tsx +++ b/src/view/screens/Search/Search.tsx @@ -48,7 +48,7 @@ import { SearchProfileCard, } from '#/view/shell/desktop/Search' import {useSetMinimalShellMode, useSetDrawerSwipeDisabled} from '#/state/shell' -import {isWeb} from '#/platform/detection' +import {isNative, isWeb} from '#/platform/detection' import {listenSoftReset} from '#/state/events' import {s} from '#/lib/styles' @@ -626,7 +626,12 @@ export function SearchScreen( keyboardDismissMode="on-drag"> diff --git a/src/view/shell/desktop/Search.tsx b/src/view/shell/desktop/Search.tsx index c24940b52..4a9483733 100644 --- a/src/view/shell/desktop/Search.tsx +++ b/src/view/shell/desktop/Search.tsx @@ -35,14 +35,36 @@ export const MATCH_HANDLE = export function SearchLinkCard({ label, to, + onPress, style, }: { label: string - to: string + to?: string + onPress?: () => void style?: ViewStyle }) { const pal = usePalette('default') + const inner = ( + + + {label} + + + ) + + if (onPress) { + return ( + + {inner} + + ) + } + return (