Fix thumbnails missing while searching in side bar.
This commit is contained in:
parent
3932ecf7c0
commit
673ab85bea
2 changed files with 9 additions and 0 deletions
|
@ -109,6 +109,13 @@ function ChannelThumbnail(props: Props) {
|
||||||
setThumbLoadError(true);
|
setThumbLoadError(true);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
onLoad={() => {
|
||||||
|
if (setThumbUploadError) {
|
||||||
|
setThumbUploadError(false);
|
||||||
|
} else {
|
||||||
|
setThumbLoadError(false);
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{!hideStakedIndicator && <ChannelStakedIndicator uri={uri} claim={claim} />}
|
{!hideStakedIndicator && <ChannelStakedIndicator uri={uri} claim={claim} />}
|
||||||
|
|
|
@ -11,6 +11,7 @@ type Props = {
|
||||||
src: string,
|
src: string,
|
||||||
objectFit?: string,
|
objectFit?: string,
|
||||||
waitLoad?: boolean,
|
waitLoad?: boolean,
|
||||||
|
onLoad?: () => void,
|
||||||
};
|
};
|
||||||
|
|
||||||
function OptimizedImage(props: Props) {
|
function OptimizedImage(props: Props) {
|
||||||
|
@ -107,6 +108,7 @@ function OptimizedImage(props: Props) {
|
||||||
onLoad={() => {
|
onLoad={() => {
|
||||||
if (waitLoad) ref.current.style.visibility = 'visible';
|
if (waitLoad) ref.current.style.visibility = 'visible';
|
||||||
adjustOptimizationIfNeeded(ref.current, objectFit, src);
|
adjustOptimizationIfNeeded(ref.current, objectFit, src);
|
||||||
|
if (imgProps.onLoad) imgProps.onLoad();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue