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

@Gnarll Gnarll commented Jul 21, 2022

No description provided.

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

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()

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>

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 }}>

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 }) => {

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}

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 })

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={{

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%' }}

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