From f4450cda51d78c16f2c2cc8a37a2d5d380f206c5 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Mon, 15 Jun 2026 00:15:47 +0800 Subject: [PATCH] fix(app): prevent Android crash when opening Providers settings (#1537) Closes #1504 --- .../app/src/components/provider-catalog-list.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/app/src/components/provider-catalog-list.tsx b/packages/app/src/components/provider-catalog-list.tsx index b73a72163..f3e0835d0 100644 --- a/packages/app/src/components/provider-catalog-list.tsx +++ b/packages/app/src/components/provider-catalog-list.tsx @@ -1,11 +1,11 @@ import { useCallback, useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; -import { Pressable, Text, View } from "react-native"; +import { Pressable, Text, TextInput, View } from "react-native"; import { SvgXml } from "react-native-svg"; import { StyleSheet, withUnistyles } from "react-native-unistyles"; import { ExternalLink, PackagePlus, Search } from "lucide-react-native"; -import { AdaptiveTextInput } from "@/components/adaptive-modal-sheet"; import { Button } from "@/components/ui/button"; +import { isWeb } from "@/constants/platform"; import { useAcpProviderCatalog, type AcpProviderCatalogItem, @@ -28,6 +28,9 @@ const ThemedPackagePlus = withUnistyles(PackagePlus); const ThemedSvgXml = withUnistyles(SvgXml); const ThemedSearch = withUnistyles(Search); const ThemedExternalLink = withUnistyles(ExternalLink); +const ThemedTextInput = withUnistyles(TextInput, (theme) => ({ + placeholderTextColor: theme.colors.foregroundMuted, +})); const foregroundColorMapping = (theme: Theme) => ({ color: theme.colors.foreground }); const foregroundMutedColorMapping = (theme: Theme) => ({ @@ -145,13 +148,14 @@ export function ProviderCatalogList({ - @@ -280,3 +284,5 @@ const styles = StyleSheet.create((theme) => ({ fontSize: theme.fontSize.sm, }, })); + +const SEARCH_INPUT_STYLE = [styles.searchInput, isWeb && { outlineStyle: "none" }];