Skip to content

Commit

Permalink
Fix long press on login screen for samsung devices
Browse files Browse the repository at this point in the history
  • Loading branch information
tommasini committed Jul 26, 2024
1 parent fd530d4 commit 8a8e048
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions app/components/Views/Login/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Image,
InteractionManager,
BackHandler,
TouchableWithoutFeedback,
TouchableOpacity,
} from 'react-native';
import Text, {
TextColor,
Expand Down Expand Up @@ -493,6 +493,7 @@ class Login extends PureComponent {
};

handleDownloadStateLogs = () => {
console.log('ENTER HERE');

Check failure on line 496 in app/components/Views/Login/index.js

View workflow job for this annotation

GitHub Actions / scripts (lint)

Unexpected console statement
const { fullState } = this.props;
downloadStateLogs(fullState, false);
};
Expand All @@ -516,23 +517,23 @@ class Login extends PureComponent {
style={styles.wrapper}
>
<View testID={LoginViewSelectors.CONTAINER}>
<TouchableWithoutFeedback
onLongPress={this.handleDownloadStateLogs}
delayLongPress={10 * 1000} // 10 seconds
<TouchableOpacity
style={styles.foxWrapper}
delayLongPress={10 * 1000} // 10 seconds
onLongPress={this.handleDownloadStateLogs}
activeOpacity={1}
>
<View style={styles.foxWrapper}>
{Device.isAndroid() ? (
<Image
source={require('../../../images/fox.png')}
style={styles.image}
resizeMethod={'auto'}
/>
) : (
<AnimatedFox bgColor={colors.background.default} />
)}
</View>
</TouchableWithoutFeedback>
{Device.isAndroid() ? (
<Image
source={require('../../../images/fox.png')}
style={styles.image}
resizeMethod={'auto'}
/>
) : (
<AnimatedFox bgColor={colors.background.default} />
)}
</TouchableOpacity>

<Text
style={styles.title}
testID={LoginViewSelectors.LOGIN_VIEW_TITLE_ID}
Expand Down

0 comments on commit 8a8e048

Please sign in to comment.