diff --git a/ui/component/channelThumbnail/view.jsx b/ui/component/channelThumbnail/view.jsx index e24c58608..cc293a458 100644 --- a/ui/component/channelThumbnail/view.jsx +++ b/ui/component/channelThumbnail/view.jsx @@ -109,6 +109,13 @@ function ChannelThumbnail(props: Props) { setThumbLoadError(true); } }} + onLoad={() => { + if (setThumbUploadError) { + setThumbUploadError(false); + } else { + setThumbLoadError(false); + } + }} /> )} {!hideStakedIndicator && } diff --git a/ui/component/optimizedImage/view.jsx b/ui/component/optimizedImage/view.jsx index 306ccae82..6722610d6 100644 --- a/ui/component/optimizedImage/view.jsx +++ b/ui/component/optimizedImage/view.jsx @@ -11,6 +11,7 @@ type Props = { src: string, objectFit?: string, waitLoad?: boolean, + onLoad?: () => void, }; function OptimizedImage(props: Props) { @@ -107,6 +108,7 @@ function OptimizedImage(props: Props) { onLoad={() => { if (waitLoad) ref.current.style.visibility = 'visible'; adjustOptimizationIfNeeded(ref.current, objectFit, src); + if (imgProps.onLoad) imgProps.onLoad(); }} /> );