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

This commit is contained in:
Julius Marminge authored and GitHub committed 2026-09-20 23:24:41 -07:00
1 parent 5781b5240b
commit 1eeeabb26f
1 file changed
+17 -2
+17 -2
View File
@@ -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} />;
}