aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShravya Ramesh <shravs1208@gmail.com>2021-07-22 14:54:20 -0700
committerShravya Ramesh <shravs1208@gmail.com>2021-07-22 14:54:20 -0700
commitb7acbd4ba2bf3441240a164703d83c68aabefd1a (patch)
tree0a5d970211b9013cee5176309ebc62cc4099c1f4
parent672a3df3c0e9761efd3701cb719970aa724f823d (diff)
Fix video replay view counts issue
-rw-r--r--src/components/moments/MomentPost.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/moments/MomentPost.tsx b/src/components/moments/MomentPost.tsx
index 6cb812e7..3a96fe9a 100644
--- a/src/components/moments/MomentPost.tsx
+++ b/src/components/moments/MomentPost.tsx
@@ -195,7 +195,7 @@ const MomentPost: React.FC<MomentPostProps> = ({
screenType={screenType}
editable={false}
/>
- <View style={{paddingHorizontal: '3%'}}>
+ <View style={styles.profilePreviewContainer}>
<Text style={styles.headerText}>{user.username}</Text>
<Text style={styles.viewCount}>
{moment.view_count <= 9999
@@ -226,6 +226,7 @@ const MomentPost: React.FC<MomentPostProps> = ({
setAspectRatio(width / height);
}}
paused={moment.moment_id !== currentVisibleMomentId}
+ onEnd={updateMomentViewCount}
/>
</View>
) : (
@@ -450,6 +451,7 @@ const styles = StyleSheet.create({
width: SCREEN_WIDTH,
height: SCREEN_HEIGHT,
},
+ profilePreviewContainer: {paddingHorizontal: '3%'},
});
export default MomentPost;