Photo: Fix flickering broken image after migrating to Offscreen Canvas blur

This commit is contained in:
Alexander Zinchuk 2024-09-06 15:43:10 +02:00
parent e9c069d356
commit 9b5c527a8a

View File

@ -218,13 +218,15 @@ const Photo = <T,>({
{withBlurredBackground && ( {withBlurredBackground && (
<canvas ref={blurredBackgroundRef} className="thumbnail blurred-bg" /> <canvas ref={blurredBackgroundRef} className="thumbnail blurred-bg" />
)} )}
<img {fullMediaData && (
src={fullMediaData} <img
className={buildClassName('full-media', withBlurredBackground && 'with-blurred-bg')} src={fullMediaData}
alt="" className={buildClassName('full-media', withBlurredBackground && 'with-blurred-bg')}
style={forcedWidth ? `width: ${forcedWidth}px` : undefined} alt=""
draggable={!isProtected} style={forcedWidth ? `width: ${forcedWidth}px` : undefined}
/> draggable={!isProtected}
/>
)}
{withThumb && ( {withThumb && (
<canvas <canvas
ref={thumbRef} ref={thumbRef}