mirror of
https://github.com/tooot-app/app
synced 2025-03-10 00:20:11 +01:00
Fix image viewer placeholder
This commit is contained in:
parent
48481a4cd5
commit
0185335138
@ -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) {
|
||||
|
@ -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:
|
||||
|
@ -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={{
|
||||
|
Loading…
x
Reference in New Issue
Block a user