Open Alexk2309 opened 1 month ago
This pull request updates the stop
function in the play-video.tsx
file to invalidate multiple queries when video playback is stopped. This change ensures that the frontend UI updates immediately when a video stops playing, addressing an issue where the UI was not updating instantly.
sequenceDiagram
actor User
participant VideoPlayer as Video Player
participant QueryClient as Query Client
participant UI as User Interface
User->>VideoPlayer: Stop video
VideoPlayer->>QueryClient: Invalidate queries
QueryClient->>UI: Trigger UI update
UI->>User: Display updated UI
Change | Details | Files |
---|---|---|
Added query invalidation for multiple queries when stopping video playback |
|
app/(auth)/play-video.tsx |
Could you please remove the duplicate 'nextUp-all' query and add the queryClient to the dep array and i'll merge this! Thank you!
@fredrikburmester Okay changes made!
This PR addresses an issue where the frontend UI was not updating instantly when a video stops playing. The changes ensure that the relevant queries are invalidated correctly, triggering an immediate UI update.
Note:
The new lines were just copied from the PlayedStatus.tsx file, this code could be refactored so that way both these two components could use one function. Please add a comment if you would like this.
Summary by Sourcery
Bug Fixes: