add values to liteFile state

This commit is contained in:
Akinwale Ariwodola 2020-03-23 17:22:29 +01:00
parent 7e1794ce29
commit 33b4806c84
2 changed files with 10 additions and 2 deletions

@ -1 +1 @@
Subproject commit 5aa051332447a00c0b6586c31b34108f5c8c132d Subproject commit cbc4a662e670941b1c82aa6846ac56923c30af2f

View file

@ -38,15 +38,19 @@ class LiteFilePage extends React.PureComponent {
player = null; player = null;
startTime = null;
state = { state = {
channelName: null, channelName: null,
channelUrl: null, channelUrl: null,
title: null, fileViewLogged: false,
fullscreenMode: false, fullscreenMode: false,
playbackStarted: false,
playerHeight: null, playerHeight: null,
isLandscape: false, isLandscape: false,
sdkReady: false, // TODO: progressively enable features (e.g. tip) when sdk is ready sdkReady: false, // TODO: progressively enable features (e.g. tip) when sdk is ready
showRecommended: false, showRecommended: false,
title: null,
viewCount: 0, viewCount: 0,
}; };
@ -127,6 +131,10 @@ class LiteFilePage extends React.PureComponent {
); );
}; };
componentDidMount() {
this.startTime = Date.now();
}
componentDidUpdate() { componentDidUpdate() {
const { navigation } = this.props; const { navigation } = this.props;
const { uri } = navigation.state.params; const { uri } = navigation.state.params;