diff --git a/static/app-strings.json b/static/app-strings.json index b819708b2..1a8fc9997 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -2311,9 +2311,9 @@ "Elements": "Elements", "Icons": "Icons", "Go to": "Go to", - "Persist watch time": "Persist watch time", "Clearing...": "Clearing...", "Clear Views": "Clear Views", - "Persist the watch time of the videos you have watched. This will not erase or hide any blockchain activity or downloads.": "Persist the watch time of the videos you have watched. This will not erase or hide any blockchain activity or downloads.", + "Show Video View Progress": "Show Video View Progress", + "Display view progress on thumbnail. This setting will not hide any blockchain activity or downloads.": "Display view progress on thumbnail. This setting will not hide any blockchain activity or downloads.", "--end--": "--end--" } diff --git a/ui/component/fileThumbnail/index.js b/ui/component/fileThumbnail/index.js index c817b8193..f9f447877 100644 --- a/ui/component/fileThumbnail/index.js +++ b/ui/component/fileThumbnail/index.js @@ -3,11 +3,14 @@ import { doResolveUri } from 'redux/actions/claims'; import { makeSelectClaimForUri } from 'redux/selectors/claims'; import { makeSelectContentWatchedPercentageForUri } from 'redux/selectors/content'; import CardMedia from './view'; +import { makeSelectClientSetting } from 'redux/selectors/settings'; +import * as SETTINGS from 'constants/settings'; const select = (state, props) => { return { watchedPercentage: makeSelectContentWatchedPercentageForUri(props.uri)(state), claim: makeSelectClaimForUri(props.uri)(state), + showPercentage: makeSelectClientSetting(SETTINGS.PERSIST_WATCH_TIME)(state), }; }; diff --git a/ui/component/fileThumbnail/view.jsx b/ui/component/fileThumbnail/view.jsx index 3a9124950..8d642c00f 100644 --- a/ui/component/fileThumbnail/view.jsx +++ b/ui/component/fileThumbnail/view.jsx @@ -17,6 +17,7 @@ type Props = { doResolveUri: (string) => void, className?: string, watchedPercentage: number, + showPercentage: boolean, }; function FileThumbnail(props: Props) { @@ -29,6 +30,7 @@ function FileThumbnail(props: Props) { allowGifs = false, className, watchedPercentage, + showPercentage, } = props; const passedThumbnail = rawThumbnail && rawThumbnail.trim().replace(/^http:\/\//i, 'https://'); @@ -39,7 +41,7 @@ function FileThumbnail(props: Props) { const hasResolvedClaim = claim !== undefined; const isGif = thumbnail && thumbnail.endsWith('gif'); - const viewedBar = watchedPercentage && ( + const viewedBar = showPercentage && watchedPercentage && (