Skip to content

Commit

Permalink
fix(player): save watch progress on player complete event
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristiaanScheermeijer committed Aug 5, 2021
1 parent 76d3eaf commit 7b8dcfb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/containers/Cinema/Cinema.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ const Cinema: React.FC<Props> = ({ item, onPlay, onPause, onComplete, onUserActi
enableWatchHistory && saveItem(item, getProgress);
onPause && onPause();
};
const handleComplete = () => onComplete && onComplete();
const handleComplete = () => () => {
enableWatchHistory && saveItem(item, getProgress);
onComplete && onComplete();
}
const handleUserActive = () => onUserActive && onUserActive();
const handleUserInactive = () => onUserInActive && onUserInActive();

Expand Down

0 comments on commit 7b8dcfb

Please sign in to comment.