Skip to content

Commit 610f564

Browse files
authored
fix(iOS): message press effect is not visible (#7042)
1 parent c925a27 commit 610f564

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

app/containers/message/Message.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import MessageTime from './Time';
2626
import { useResponsiveLayout } from '../../lib/hooks/useResponsiveLayout/useResponsiveLayout';
2727
import Quote from './Components/Attachments/Quote';
2828
import translationLanguages from '../../lib/constants/translationLanguages';
29-
import Touchable from '../Touchable';
29+
import Touch from './Touch';
3030

3131
const MessageInner = React.memo((props: IMessageInner) => {
3232
const { isLargeFontScale } = useResponsiveLayout();
@@ -237,15 +237,15 @@ const MessageTouchable = React.memo((props: IMessageTouchable & IMessage) => {
237237
return (
238238
<A11y.Order>
239239
<A11y.Index index={1}>
240-
<Touchable
240+
<Touch
241241
onLongPress={onLongPress}
242242
onPress={onPress}
243243
disabled={
244244
(props.isInfo && !props.isThreadReply) || props.archived || props.isTemp || props.type === 'jitsi_call_started'
245245
}
246246
style={{ backgroundColor }}>
247247
<Message {...props} />
248-
</Touchable>
248+
</Touch>
249249
</A11y.Index>
250250
</A11y.Order>
251251
);
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {
1111
type TouchableWithoutFeedbackProps
1212
} from 'react-native';
1313

14-
import { useTheme } from '../theme';
15-
import { isIOS } from '../lib/methods/helpers';
14+
import { useTheme } from '../../theme';
15+
import { isIOS } from '../../lib/methods/helpers';
1616

1717
export interface ITouchProps extends TouchableWithoutFeedbackProps {
1818
children: React.ReactNode;
@@ -29,7 +29,7 @@ export interface ITouchProps extends TouchableWithoutFeedbackProps {
2929

3030
const Component = isIOS ? TouchableOpacity : TouchableNativeFeedback;
3131

32-
const Touchable = React.forwardRef<View, ITouchProps>(
32+
const Touch = React.forwardRef<View, ITouchProps>(
3333
(
3434
{
3535
children,
@@ -78,10 +78,9 @@ const Touchable = React.forwardRef<View, ITouchProps>(
7878
marginStart,
7979
marginTop
8080
};
81-
const androidProps = isIOS
81+
const touchableProps = isIOS
8282
? {}
8383
: { background: TouchableNativeFeedback.Ripple(android_rippleColor ?? colors.surfaceNeutral, false) };
84-
const touchableProps = isIOS ? { activeOpacity: 1 } : {};
8584

8685
return (
8786
<Component
@@ -90,7 +89,6 @@ const Touchable = React.forwardRef<View, ITouchProps>(
9089
style={[rectButtonStyle, marginStyles, { backgroundColor, borderRadius }]}
9190
disabled={!enabled}
9291
{...touchableProps}
93-
{...androidProps}
9492
{...props}>
9593
<View
9694
accessible={accessible}
@@ -107,4 +105,4 @@ const Touchable = React.forwardRef<View, ITouchProps>(
107105
}
108106
);
109107

110-
export default Touchable;
108+
export default Touch;

0 commit comments

Comments
 (0)