From 516bb1e67d21e8b714e32ad00f9bda9f7d818d5c Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Sat, 27 Mar 2021 00:17:34 +0100 Subject: [PATCH] Image viewer use blurhash as loading placeholder --- src/@types/react-navigation.d.ts | 3 ++- src/components/GracefullyImage.tsx | 10 ++-------- src/components/Timeline/Shared/Attachment.tsx | 1 + .../ImageViewer/components/ImageItem.android.tsx | 1 + src/screens/ImageViewer/components/ImageItem.ios.tsx | 1 + 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/@types/react-navigation.d.ts b/src/@types/react-navigation.d.ts index 33834f60..acf59127 100644 --- a/src/@types/react-navigation.d.ts +++ b/src/@types/react-navigation.d.ts @@ -58,9 +58,10 @@ declare namespace Nav { imageUrls: { id: Mastodon.Attachment['id'] url: Mastodon.AttachmentImage['url'] + remote_url?: Mastodon.AttachmentImage['remote_url'] + blurhash: Mastodon.AttachmentImage['blurhash'] width?: number height?: number - remote_url?: Mastodon.AttachmentImage['remote_url'] }[] id: Mastodon.Attachment['id'] } diff --git a/src/components/GracefullyImage.tsx b/src/components/GracefullyImage.tsx index 04ad5270..ed2deccd 100644 --- a/src/components/GracefullyImage.tsx +++ b/src/components/GracefullyImage.tsx @@ -102,11 +102,7 @@ const GracefullyImage = React.memo( return (