Fix thumbnails missing while searching in side bar.

This commit is contained in:
Franco Montenegro 2022-04-25 11:45:55 -03:00 committed by jessopb
parent 3932ecf7c0
commit 673ab85bea
2 changed files with 9 additions and 0 deletions

View file

@ -109,6 +109,13 @@ function ChannelThumbnail(props: Props) {
setThumbLoadError(true);
}
}}
onLoad={() => {
if (setThumbUploadError) {
setThumbUploadError(false);
} else {
setThumbLoadError(false);
}
}}
/>
)}
{!hideStakedIndicator && <ChannelStakedIndicator uri={uri} claim={claim} />}

View file

@ -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();
}}
/>
);