Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Aug 8, 2024
1 parent e51f66e commit a0f8339
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/VideoPlayerContexts/PlaybackContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ function PlaybackContextProvider({children}: ChildrenProps) {
}, [stopVideo, unloadVideo]);

useEffect(() => {
// currentReportID is initially empty/-1 and we don't want to reset the video player data when it was previously empty/-1
// This logic ensures that resetVideoPlayerData is only called when currentReportID

Check failure on line 92 in src/components/VideoPlayerContexts/PlaybackContext.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint

Delete `·`
// changes from one valid value (i.e., not an empty string or '-1') to another valid value.
// This prevents the video that plays when the app opens from being interrupted when currentReportID

Check failure on line 94 in src/components/VideoPlayerContexts/PlaybackContext.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint

Delete `·`
// is initially empty or '-1', or when it changes from empty/'-1' to another value

Check failure on line 95 in src/components/VideoPlayerContexts/PlaybackContext.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint

Delete `·`
// after the report screen in the central pane is mounted on the large screen.
if (!currentReportID || !prevCurrentReportID || currentReportID === '-1' || prevCurrentReportID === '-1') {
return;
}
Expand Down

0 comments on commit a0f8339

Please sign in to comment.