Skip to content

Commit

Permalink
fix: android dapp favirate press
Browse files Browse the repository at this point in the history
  • Loading branch information
cs1707 committed Dec 2, 2024
1 parent 0c9c5ad commit 6592cd3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/mobile/src/screens/Dapps/DappsScreen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ export function DappsScreen(): JSX.Element {
Keyboard.dismiss();
});

const handleFavoriteDapp = (dapp: DappInfo) => {
const handleFavoriteDapp = useMemoizedFn((dapp: DappInfo) => {
const v = !dapp.isFavorite;
setDapp({
...dapp,
isFavorite: v,
favoriteAt: v ? Date.now() : null,
});
};
});

const handleDeleteHistory = useMemoizedFn((dapp: DappInfo) => {
removeBrowserHistory(dapp.origin);
Expand Down
3 changes: 1 addition & 2 deletions apps/mobile/src/screens/Dapps/components/DappCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,9 @@ export const DappCardInner: React.FC<DappCardProps> = ({
</View>
<TouchableOpacity
style={styles.dappAction}
disallowInterruption={true}
// disallowInterruption={true}
hitSlop={10}
onLongPress={noop}
// delayLongPress={100}
onPress={() => {
onFavoritePress?.(data);
}}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const DappHistoryCardList = ({
return (
<View style={styles.listItem}>
<ContextMenuView
triggerProps={{ action: 'longPress' }}
menuConfig={{
menuTitle: stringUtils.unPrefix(item.origin, 'https://'),
menuActions: [
Expand Down

0 comments on commit 6592cd3

Please sign in to comment.