Skip to content
TypeScript

fix(mobile): use a proper pull request icon on iOS (#12855)

Julius Marminge1eeeabb26f65
diff --git a/apps/mobile/src/components/AppSymbol.ios.tsx b/apps/mobile/src/components/AppSymbol.ios.tsx
index 8f3f5f8abf7..e58d2af7dbb 100644
--- a/apps/mobile/src/components/AppSymbol.ios.tsx
+++ b/apps/mobile/src/components/AppSymbol.ios.tsx
@@ -1,3 +1,4 @@
+import IconGitPullRequest from "@tabler/icons-react-native/IconGitPullRequest";
import { SymbolView as ExpoSymbolView } from "expo-symbols";
import { withUniwind } from "uniwind";
import type { AppSymbolViewProps } from "./AppSymbol";
@@ -6,10 +7,24 @@ export type { SFSymbol } from "expo-symbols";
export type { AppSymbolName } from "./AppSymbol";
/**
- * Keep the iOS implementation isolated from the Android Tabler fallback so
- * Metro does not initialize the icon package when iOS renders SF Symbols.
+ * Use SF Symbols on iOS except for pull requests, which have no matching
+ * native glyph. Import only that Tabler icon to keep the bundle small.
*/
function AppSymbolView(props: AppSymbolViewProps) {
+ const name = typeof props.name === "string" ? props.name : props.name.ios;
+ if (name === "arrow.triangle.pull") {
+ return (
+ <IconGitPullRequest
+ accessibilityLabel={props.accessibilityLabel}
+ color={props.tintColor}
+ size={props.size}
+ strokeWidth={2}
+ style={props.style}
+ testID={props.testID}
+ />
+ );
+ }
+
return <ExpoSymbolView {...props} />;
}