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
2 people authored and gogdzl committed Oct 25, 2024
1 parent 65f72a3 commit 8dd7def
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 8dd7def

Please sign in to comment.