1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Use the same subdomain for connect media

Preventing count as cache miss
This commit is contained in:
xmflsct
2023-01-31 14:26:43 +01:00
parent 602e010cfc
commit 624c1f172c
10 changed files with 36 additions and 22 deletions

View File

@ -1,5 +1,5 @@
import { useAccessibility } from '@utils/accessibility/AccessibilityManager'
import { connectImage } from '@utils/api/helpers/connect'
import { connectMedia } from '@utils/api/helpers/connect'
import { useTheme } from '@utils/styles/ThemeManager'
import React, { useEffect, useState } from 'react'
import {
@ -93,12 +93,12 @@ const GracefullyImage = ({
>
{uri.preview && !imageLoaded ? (
<FastImage
source={connectImage({ uri: uri.preview })}
source={connectMedia({ uri: uri.preview })}
style={[styles.placeholder, { backgroundColor: colors.shimmerDefault }]}
/>
) : null}
<FastImage
source={connectImage(source)}
source={connectMedia(source)}
style={[{ flex: 1 }, imageStyle]}
onLoad={() => {
setImageLoaded(true)