From 0203f7a45f0cf68daa9aece8d86f1b5bee1fb0de Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 4 Feb 2020 01:02:39 -0500 Subject: [PATCH] fix view counts --- ui/component/floatingViewer/view.jsx | 2 +- ui/page/embedWrapper/view.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/component/floatingViewer/view.jsx b/ui/component/floatingViewer/view.jsx index 6a3e7fd85..8b2575699 100644 --- a/ui/component/floatingViewer/view.jsx +++ b/ui/component/floatingViewer/view.jsx @@ -88,7 +88,7 @@ export default function FileViewer(props: Props) { const timeToStart = Date.now() - playTime; triggerAnalyticsView(uri, timeToStart).then(() => { claimRewards(); - setHasRecordedView(true); + setHasRecordedView(false); // This is a terrible variable name, rename this setPlayTime(null); }); } diff --git a/ui/page/embedWrapper/view.jsx b/ui/page/embedWrapper/view.jsx index 16f506ca6..781ed2bfc 100644 --- a/ui/page/embedWrapper/view.jsx +++ b/ui/page/embedWrapper/view.jsx @@ -17,7 +17,7 @@ const EmbedWrapperPage = (props: Props) => { useEffect(() => { if (!hasRecordedView && uri && claim) { triggerAnalyticsView(uri).then(() => { - setHasRecordedView(true); + setHasRecordedView(false); }); } }, [triggerAnalyticsView, setHasRecordedView, hasRecordedView, uri, claim]);