Skip to content

Commit

Permalink
VideoPress: use "Processing" thumbnail placeholder while a new thumbn…
Browse files Browse the repository at this point in the history
…ail is being saved (#39631)

* Export the thumb update status on the edit details hook

* Use poster updating status to set video thumb as processing

* Changelog

---------

Co-authored-by: Douglas <[email protected]>
  • Loading branch information
lhkowalski and dhasilva authored Oct 7, 2024
1 parent 3f185ff commit dd2077a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

VideoPress: fix thumbnail update bug that showed the old thumbnail for a couple seconds on the details page.
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ const EditVideoDetails = () => {
selectPosterImageFromLibrary,
posterImageSource,
libraryAttachment,
isUpdatingPoster,
} = useEditDetails();

const { canPerformAction } = usePermission();
Expand Down Expand Up @@ -312,7 +313,7 @@ const EditVideoDetails = () => {
<VideoThumbnail
thumbnail={ thumbnail }
loading={ isFetchingData }
processing={ processing }
processing={ processing || isUpdatingPoster }
deleting={ isDeleting }
updating={ updating }
duration={ duration }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export default () => {
processing,
isDeleting,
updateVideoPrivacy,
isUpdatingPoster,
} = useVideo( Number( videoId ), true );

const { playbackToken, isFetchingPlaybackToken } = usePlaybackToken( video );
Expand Down Expand Up @@ -331,5 +332,6 @@ export default () => {
selectedTime,
...metaEditData,
...posterEditData,
isUpdatingPoster,
};
};

0 comments on commit dd2077a

Please sign in to comment.