Skip to content

Commit

Permalink
fix crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
haileyok committed Mar 5, 2024
1 parent f27e26f commit ab66b9f
Show file tree
Hide file tree
Showing 11 changed files with 1,055 additions and 595 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
"expo-camera": "~14.0.4",
"expo-clipboard": "^5.0.1",
"expo-constants": "~15.4.5",
"expo-dev-client": "~3.3.8",
"expo-device": "~5.9.3",
"expo-file-system": "^16.0.7",
"expo-haptics": "^12.8.1",
Expand Down
18 changes: 7 additions & 11 deletions src/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,23 +277,19 @@ function commonScreens(Stack: typeof HomeTab, unreadCountLabel?: string) {
* in 3 distinct tab-stacks with a different root screen on each.
*/
function TabsNavigator() {
{
/* TODO FABRIC */
}
// const tabBar = React.useCallback(
// (props: JSX.IntrinsicAttributes & BottomTabBarProps) => (
// <BottomBar {...props} />
// ),
// [],
// )
const tabBar = React.useCallback(
(props: JSX.IntrinsicAttributes & BottomTabBarProps) => (
<BottomBar {...props} />
),
[],
)

return (
<Tab.Navigator
initialRouteName="HomeTab"
backBehavior="initialRoute"
screenOptions={{headerShown: false, lazy: true}}
// tabBar={tabBar}
>
tabBar={tabBar}>
<Tab.Screen name="HomeTab" getComponent={() => HomeTabNavigator} />
<Tab.Screen name="SearchTab" getComponent={() => SearchTabNavigator} />
<Tab.Screen name="FeedsTab" getComponent={() => FeedsTabNavigator} />
Expand Down
39 changes: 18 additions & 21 deletions src/lib/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -455,14 +455,13 @@ export function RepostIcon({
}) {
return (
<Svg viewBox="0 0 24 24" width={size} height={size} style={style}>
{/* TODO FABRIC */}
{/*<Path*/}
{/* stroke="currentColor"*/}
{/* strokeWidth={strokeWidth}*/}
{/* strokeLinejoin="round"*/}
{/* fill="none"*/}
{/* d="M 14.437 18.081 L 5.475 18.095 C 4.7 18.095 4.072 17.467 4.072 16.692 L 4.082 6.65 L 1.22 10.854 M 4.082 6.65 L 7.006 10.854 M 9.859 6.65 L 18.625 6.654 C 19.4 6.654 20.028 7.282 20.028 8.057 L 20.031 18.081 L 17.167 13.646 M 20.031 18.081 L 22.866 13.646"*/}
{/*/>*/}
<Path
stroke="currentColor"
strokeWidth={strokeWidth}
strokeLinejoin="round"
fill="none"
d="M 14.437 18.081 L 5.475 18.095 C 4.7 18.095 4.072 17.467 4.072 16.692 L 4.082 6.65 L 1.22 10.854 M 4.082 6.65 L 7.006 10.854 M 9.859 6.65 L 18.625 6.654 C 19.4 6.654 20.028 7.282 20.028 8.057 L 20.031 18.081 L 17.167 13.646 M 20.031 18.081 L 22.866 13.646"
/>
</Svg>
)
}
Expand All @@ -479,13 +478,12 @@ export function HeartIcon({
}) {
return (
<Svg viewBox="0 0 24 24" width={size} height={size} style={style}>
{/* TODO FABRIC */}
{/*<Path*/}
{/* strokeWidth={strokeWidth}*/}
{/* stroke="currentColor"*/}
{/* fill="none"*/}
{/* d="M 3.859 13.537 L 10.918 20.127 C 11.211 20.4 11.598 20.552 12 20.552 C 12.402 20.552 12.789 20.4 13.082 20.127 L 20.141 13.537 C 21.328 12.431 22 10.88 22 9.259 L 22 9.033 C 22 6.302 20.027 3.974 17.336 3.525 C 15.555 3.228 13.742 3.81 12.469 5.084 L 12 5.552 L 11.531 5.084 C 10.258 3.81 8.445 3.228 6.664 3.525 C 3.973 3.974 2 6.302 2 9.033 L 2 9.259 C 2 10.88 2.672 12.431 3.859 13.537 Z"*/}
{/*/>*/}
<Path
strokeWidth={strokeWidth}
stroke="currentColor"
fill="none"
d="M 3.859 13.537 L 10.918 20.127 C 11.211 20.4 11.598 20.552 12 20.552 C 12.402 20.552 12.789 20.4 13.082 20.127 L 20.141 13.537 C 21.328 12.431 22 10.88 22 9.259 L 22 9.033 C 22 6.302 20.027 3.974 17.336 3.525 C 15.555 3.228 13.742 3.81 12.469 5.084 L 12 5.552 L 11.531 5.084 C 10.258 3.81 8.445 3.228 6.664 3.525 C 3.973 3.974 2 6.302 2 9.033 L 2 9.259 C 2 10.88 2.672 12.431 3.859 13.537 Z"
/>
</Svg>
)
}
Expand Down Expand Up @@ -639,12 +637,11 @@ export function CommentBottomArrow({
width={size || 24}
height={size || 24}
style={style}>
{/* TODO FABRIC */}
{/*<Path*/}
{/* strokeLinecap="round"*/}
{/* strokeLinejoin="round"*/}
{/* d="M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.068.157 2.148.279 3.238.364.466.037.893.281 1.153.671L12 21l2.652-3.978c.26-.39.687-.634 1.153-.67 1.09-.086 2.17-.208 3.238-.365 1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"*/}
{/*/>*/}
<Path
strokeLinecap="round"
strokeLinejoin="round"
d="M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.068.157 2.148.279 3.238.364.466.037.893.281 1.153.671L12 21l2.652-3.978c.26-.39.687-.634 1.153-.67 1.09-.086 2.17-.208 3.238-.365 1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"
/>
</Svg>
)
}
Expand Down
2 changes: 0 additions & 2 deletions src/lib/strings/url-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ export function isBskyAppUrl(url: string): boolean {
return url.startsWith('https://bsky.app/')
}

// TODO FABRIC
export function isExternalUrl(url: string): boolean {
return true
return !isBskyAppUrl(url) && url.startsWith('http')
}

Expand Down
30 changes: 15 additions & 15 deletions src/view/com/home/HomeHeaderLayoutMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ export function HomeHeaderLayoutMobile({
msg`Access profile and other navigation links`,
)}
hitSlop={HITSLOP_10}>
{/* TODO FABRIC */}
{/*<FontAwesomeIcon*/}
{/* icon="bars"*/}
{/* size={18}*/}
{/* color={pal.colors.textLight}*/}
{/*/>*/}
<FontAwesomeIcon
icon="bars"
size={18}
color={pal.colors.textLight}
/>
</TouchableOpacity>
</View>
{/* TODO FABRIC */}
<View>{/*<Logo width={30} />*/}</View>
<View>
<Logo width={30} />
</View>
<View
style={[
atoms.flex_row,
Expand All @@ -71,9 +71,10 @@ export function HomeHeaderLayoutMobile({
pal.view,
{width: 100},
]}>
{/* TODO FABRIC */}
{IS_DEV && (
<Link2 to="/sys/debug">{/*<ColorPalette size="md" />*/}</Link2>
<Link2 to="/sys/debug">
<ColorPalette size="md" />
</Link2>
)}
<Link
testID="viewHeaderHomeFeedPrefsBtn"
Expand All @@ -82,11 +83,10 @@ export function HomeHeaderLayoutMobile({
accessibilityRole="button"
accessibilityLabel={_(msg`Following Feed Preferences`)}
accessibilityHint="">
{/* TODO FABRIC */}
{/*<FontAwesomeIcon*/}
{/* icon="sliders"*/}
{/* style={pal.textLight as FontAwesomeIconStyle}*/}
{/*/>*/}
<FontAwesomeIcon
icon="sliders"
style={pal.textLight as FontAwesomeIconStyle}
/>
</Link>
</View>
</View>
Expand Down
34 changes: 16 additions & 18 deletions src/view/com/posts/FeedItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,14 @@ let FeedItemInner = ({
reason.by.displayName || reason.by.handle,
)}`,
)}>
{/* TODO FABRIC */}
{/*<FontAwesomeIcon*/}
{/* icon="retweet"*/}
{/* style={{*/}
{/* marginRight: 4,*/}
{/* color: pal.colors.textLight,*/}
{/* minWidth: 16,*/}
{/* }}*/}
{/*/>*/}
<FontAwesomeIcon
icon="retweet"
style={{
marginRight: 4,
color: pal.colors.textLight,
minWidth: 16,
}}
/>
<Text
type="sm-bold"
style={pal.textLight}
Expand Down Expand Up @@ -272,15 +271,14 @@ let FeedItemInner = ({
/>
{!isThreadChild && replyAuthorDid !== '' && (
<View style={[s.flexRow, s.mb2, s.alignCenter]}>
{/* TODO FABRIC */}
{/*<FontAwesomeIcon*/}
{/* icon="reply"*/}
{/* size={9}*/}
{/* style={[*/}
{/* {color: pal.colors.textLight} as FontAwesomeIconStyle,*/}
{/* s.mr5,*/}
{/* ]}*/}
{/*/>*/}
<FontAwesomeIcon
icon="reply"
size={9}
style={[
{color: pal.colors.textLight} as FontAwesomeIconStyle,
s.mr5,
]}
/>
<Text
type="md"
style={[pal.textLight, s.mr2]}
Expand Down
3 changes: 1 addition & 2 deletions src/view/com/util/fab/FABInner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ export function FABInner({testID, icon, ...props}: FABProps) {
start={{x: 0, y: 0}}
end={{x: 1, y: 1}}
style={[styles.inner, size]}>
{/* TODO FABRIC */}
{/*{icon}*/}
{icon}
</LinearGradient>
</Animated.View>
</TouchableWithoutFeedback>
Expand Down
3 changes: 1 addition & 2 deletions src/view/com/util/load-latest/LoadLatestBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ export function LoadLatestBtn({
accessibilityRole="button"
accessibilityLabel={label}
accessibilityHint="">
{/* TODO FABRIC */}
{/*<FontAwesomeIcon icon="angle-up" color={pal.colors.text} size={19} />*/}
<FontAwesomeIcon icon="angle-up" color={pal.colors.text} size={19} />
{showIndicator && <View style={[styles.indicator, pal.borderDark]} />}
</AnimatedTouchableOpacity>
)
Expand Down
23 changes: 11 additions & 12 deletions src/view/com/util/post-ctrls/PostCtrls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,22 +217,21 @@ let PostCtrls = ({
} (${post.likeCount} ${pluralize(post.likeCount || 0, 'like')})`}
accessibilityHint=""
hitSlop={big ? HITSLOP_20 : HITSLOP_10}>
{/* TODO FABRIC */}
{/*<ArrowOutOfBox style={[defaultCtrlColor, styles.mt1]} width={22} />*/}
<ArrowOutOfBox style={[defaultCtrlColor, styles.mt1]} width={22} />
</TouchableOpacity>
</View>
)}
<View style={big ? styles.ctrlBig : styles.ctrl}>
{/* <PostDropdownBtn*/}
{/* testID="postDropdownBtn"*/}
{/* postAuthor={post.author}*/}
{/* postCid={post.cid}*/}
{/* postUri={post.uri}*/}
{/* record={record}*/}
{/* richText={richText}*/}
{/* showAppealLabelItem={showAppealLabelItem}*/}
{/* style={styles.btnPad}*/}
{/* />*/}
<PostDropdownBtn
testID="postDropdownBtn"
postAuthor={post.author}
postCid={post.cid}
postUri={post.uri}
record={record}
richText={richText}
showAppealLabelItem={showAppealLabelItem}
style={styles.btnPad}
/>
</View>
</View>
)
Expand Down
19 changes: 9 additions & 10 deletions src/view/shell/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,15 @@ function ShellInner() {
style={containerPadding}
importantForAccessibility={importantForAccessibility}>
<ErrorBoundary>
{/* TODO FABRIC */}
{/*<Drawer*/}
{/* renderDrawerContent={renderDrawerContent}*/}
{/* open={isDrawerOpen}*/}
{/* onOpen={onOpenDrawer}*/}
{/* onClose={onCloseDrawer}*/}
{/* swipeEdgeWidth={winDim.width / 2}*/}
{/* swipeEnabled={!canGoBack && hasSession && !isDrawerSwipeDisabled}>*/}
<TabsNavigator />
{/*</Drawer>*/}
<Drawer
renderDrawerContent={renderDrawerContent}
open={isDrawerOpen}
onOpen={onOpenDrawer}
onClose={onCloseDrawer}
swipeEdgeWidth={winDim.width / 2}
swipeEnabled={!canGoBack && hasSession && !isDrawerSwipeDisabled}>
<TabsNavigator />
</Drawer>
</ErrorBoundary>
</View>
<Composer winHeight={winDim.height} />
Expand Down
Loading

0 comments on commit ab66b9f

Please sign in to comment.