Fix image viewer placeholder

This commit is contained in:
xmflsct 2023-02-08 21:41:16 +01:00
parent 48481a4cd5
commit 0185335138
3 changed files with 6 additions and 4 deletions

View File

@ -63,9 +63,10 @@ const GracefullyImage = ({
{...(onPress ? (hidden ? { disabled: true } : { onPress }) : { disabled: true })}
>
<Image
placeholderContentFit='cover'
placeholder={sources.blurhash || connectMedia(sources.preview)}
source={hidden ? undefined : connectMedia(source)}
transition={{ duration: 100 }}
transition={{ duration: 80 }}
style={{ flex: 1, ...imageStyle }}
onLoad={event => {
if (setImageDimensions && event.source) {

View File

@ -194,9 +194,9 @@ const ScreenImagesViewer = ({
>
<GracefullyImage
sources={{
preview: { uri: item.preview_url, width: item.width, height: item.height },
default: { uri: item.url, width: item.width, height: item.height },
remote: { uri: item.remote_url, width: item.width, height: item.height }
preview: { uri: item.preview_url },
default: { uri: item.url },
remote: { uri: item.remote_url }
}}
dimension={{
width:

View File

@ -52,6 +52,7 @@ const ScreenTabs = () => {
return (
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<GracefullyImage
key={accountActive}
sources={{ default: { uri: avatarStatic } }}
dimension={{ width: size, height: size }}
style={{