-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewind feature #1
base: master
Are you sure you want to change the base?
Conversation
const rewindOnDoubleTap = (e: TapGestureHandlerStateChangeEvent) => { | ||
playerRef.current?.context | ||
if ( | ||
e.nativeEvent.state === State.ACTIVE && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, move this logic to variable
e.nativeEvent.y < rewindingViewHeight + rewindingViewHeightMargin && | ||
e.nativeEvent.y > rewindingViewHeightMargin | ||
) { | ||
if (e.nativeEvent.x < rewindingViewWidth) rewindLeft() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, use next styling
if () {}
onHandlerStateChange={rewindOnDoubleTap} | ||
numberOfTaps={2} | ||
> | ||
<View> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
View - is necessary?
}, | ||
] | ||
|
||
export const HomeScreen = ({ navigation }: HomeScreenProps) => { | ||
return ( | ||
<SafeAreaView style={styles.container}> | ||
<SafeAreaView style={{ flex: 1 }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, not use inline styles
<FlatList | ||
contentContainerStyle={styles.container} | ||
data={VIDEOS} | ||
keyExtractor={(video) => video.id} | ||
renderItem={({ item }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, use useCallback
<FlatList | ||
contentContainerStyle={styles.container} | ||
data={VIDEOS} | ||
keyExtractor={(video) => video.id} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useCallback
data={VIDEOS} | ||
keyExtractor={(video) => video.id} | ||
renderItem={({ item }) => { | ||
return ( | ||
<TouchableOpacity | ||
style={styles.listItem} | ||
onPress={() => { | ||
navigation.navigate(SCREEN_NAMES.Video, { uri: item.uri }) | ||
navigation.navigate(SCREEN_NAMES.Video, { uri: item.videoUri }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useCallback
}} | ||
> | ||
<Text style={{ fontSize: 30 }}>{item.title}</Text> | ||
<Image | ||
source={{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useMemo
source={{ | ||
uri: item.imageUrl, | ||
}} | ||
style={{ width: '100%', height: '100%' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, don't use inline styles
No description provided.