svg rendering fix

This commit is contained in:
tapframe 2025-11-02 16:57:21 +05:30
parent d6af98c6d7
commit 80cdc98902
2 changed files with 28 additions and 10 deletions

View file

@ -7,6 +7,7 @@ import {
ActivityIndicator, ActivityIndicator,
Platform, Platform,
Clipboard, Clipboard,
Image,
} from 'react-native'; } from 'react-native';
import { MaterialIcons } from '@expo/vector-icons'; import { MaterialIcons } from '@expo/vector-icons';
import FastImage from '@d11/react-native-fast-image'; import FastImage from '@d11/react-native-fast-image';
@ -190,11 +191,19 @@ const StreamCard = memo(({
{/* Scraper Logo */} {/* Scraper Logo */}
{showLogos && scraperLogo && ( {showLogos && scraperLogo && (
<View style={styles.scraperLogoContainer}> <View style={styles.scraperLogoContainer}>
<FastImage {scraperLogo.toLowerCase().endsWith('.svg') || scraperLogo.toLowerCase().includes('.svg?') ? (
source={{ uri: scraperLogo }} <Image
style={styles.scraperLogo} source={{ uri: scraperLogo }}
resizeMode={FastImage.resizeMode.contain} style={styles.scraperLogo}
/> resizeMode="contain"
/>
) : (
<FastImage
source={{ uri: scraperLogo }}
style={styles.scraperLogo}
resizeMode={FastImage.resizeMode.contain}
/>
)}
</View> </View>
)} )}

View file

@ -14,6 +14,7 @@ import {
Modal, Modal,
Dimensions, Dimensions,
Animated, Animated,
Image,
} from 'react-native'; } from 'react-native';
import CustomAlert from '../components/CustomAlert'; import CustomAlert from '../components/CustomAlert';
import FastImage from '@d11/react-native-fast-image'; import FastImage from '@d11/react-native-fast-image';
@ -1619,11 +1620,19 @@ const PluginsScreen: React.FC = () => {
<View key={scraper.id} style={styles.scraperCard}> <View key={scraper.id} style={styles.scraperCard}>
<View style={styles.scraperCardHeader}> <View style={styles.scraperCardHeader}>
{scraper.logo ? ( {scraper.logo ? (
<FastImage (scraper.logo.toLowerCase().endsWith('.svg') || scraper.logo.toLowerCase().includes('.svg?')) ? (
source={{ uri: scraper.logo }} <Image
style={styles.scraperLogo} source={{ uri: scraper.logo }}
resizeMode={FastImage.resizeMode.contain} style={styles.scraperLogo}
/> resizeMode="contain"
/>
) : (
<FastImage
source={{ uri: scraper.logo }}
style={styles.scraperLogo}
resizeMode={FastImage.resizeMode.contain}
/>
)
) : ( ) : (
<View style={styles.scraperLogo} /> <View style={styles.scraperLogo} />
)} )}