Skip to content

Commit 909c4a6

Browse files
authored
fix: resolve deeplink not launching app in web and lock button not closing popup immediately (#7185)
1 parent d3b103a commit 909c4a6

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

packages/components/src/layouts/Swiper/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { ForwardedRef } from 'react';
2-
import { forwardRef, useCallback, useImperativeHandle } from 'react';
2+
import { forwardRef, useCallback, useImperativeHandle, useMemo } from 'react';
33

44
import { YStack } from 'tamagui';
55

@@ -96,6 +96,10 @@ function BaseSwiperFlatList<T>(
9696
},
9797
}));
9898

99+
const extraData = useMemo(() => {
100+
return [renderItem, data];
101+
}, [data, renderItem]);
102+
99103
return (
100104
<YStack
101105
position="relative"
@@ -116,7 +120,7 @@ function BaseSwiperFlatList<T>(
116120
scrollEnabled={scrollEnabled}
117121
renderItem={handleRenderItem}
118122
data={data}
119-
extraData={data}
123+
extraData={extraData}
120124
initialNumToRender={1}
121125
initialScrollIndex={index}
122126
estimatedItemSize={sharedStyle.height as number}

packages/kit/src/components/TabPageHeader/MoreActionButton.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ function MoreActionButtonCmp() {
157157
id: ETranslations.settings_lock_now,
158158
}),
159159
icon: 'LockOutline' as const,
160-
onPress: onLock,
160+
onPress: () => {
161+
void onLock();
162+
},
161163
testID: 'lock-now',
162164
},
163165
{

packages/kit/src/views/ReferFriends/pages/ReferAFriend/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ export default function ReferAFriend() {
310310
code: code || '',
311311
},
312312
});
313-
void openUrlUtils.linkingCanOpenURL(url);
314313
defaultLogger.referral.page.enterReferralGuide(code);
314+
globalThis.location.href = url;
315315
}
316316
});
317317
}, [navigation]);

0 commit comments

Comments
 (0)