diff --git a/app/components/DocumentMetaWithViews.js b/app/components/DocumentMetaWithViews.js index e7ca93e1..877acca7 100644 --- a/app/components/DocumentMetaWithViews.js +++ b/app/components/DocumentMetaWithViews.js @@ -14,14 +14,18 @@ type Props = {| function DocumentMetaWithViews({ to, isDraft, document }: Props) { const { views } = useStores(); - const totalViews = useObserver(() => views.countForDocument(document.id)); + const documentViews = useObserver(() => views.inDocument(document.id)); + const totalViewers = documentViews.length; + const onlyYou = totalViewers === 1 && documentViews[0].user.id; return ( - {totalViews && !isDraft ? ( + {totalViewers && !isDraft ? ( <> -  · Viewed{" "} - {totalViews === 1 ? "once" : `${totalViews} times`} +  · Viewed by{" "} + {onlyYou + ? "only you" + : `${totalViewers} ${totalViewers === 1 ? "person" : "people"}`} ) : null}