Skip to content

Rewind feature#1

Open
Gnarll wants to merge 4 commits intomasterfrom
rewind-feature
Open

Rewind feature#1
Gnarll wants to merge 4 commits intomasterfrom
rewind-feature

Conversation

@Gnarll
Copy link
Copy Markdown

@Gnarll Gnarll commented Jul 21, 2022

No description provided.

const rewindOnDoubleTap = (e: TapGestureHandlerStateChangeEvent) => {
playerRef.current?.context
if (
e.nativeEvent.state === State.ACTIVE &&
Copy link
Copy Markdown

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()
Copy link
Copy Markdown

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>
Copy link
Copy Markdown

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 }}>
Copy link
Copy Markdown

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

contentContainerStyle={styles.container}
data={VIDEOS}
keyExtractor={(video) => video.id}
renderItem={({ item }) => {
Copy link
Copy Markdown

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}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useCallback

style={styles.listItem}
onPress={() => {
navigation.navigate(SCREEN_NAMES.Video, { uri: item.uri })
navigation.navigate(SCREEN_NAMES.Video, { uri: item.videoUri })
Copy link
Copy Markdown

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={{
Copy link
Copy Markdown

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%' }}
Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants