mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 06:52:43 +01:00
bugfixes
- fixed image path for RNTP notification - fixed overwhelming number of promises/requests generated when scrolling through artists (could still delay loading those further...) - fixed spinner not spinning while artistInfo is fetched for image url
This commit is contained in:
@@ -27,11 +27,6 @@ const ImageSource = React.memo<{ cache?: { file?: CacheFile; request?: CacheRequ
|
||||
({ cache, style, imageStyle, resizeMode }) => {
|
||||
const [error, setError] = useState(false)
|
||||
|
||||
if (error) {
|
||||
console.log('error!')
|
||||
console.log(cache?.file?.path)
|
||||
}
|
||||
|
||||
let source: ImageSourcePropType
|
||||
if (!error && cache?.file && !cache?.request?.promise) {
|
||||
source = { uri: `file://${cache.file.path}`, cache: 'reload' }
|
||||
@@ -62,7 +57,7 @@ const ImageSource = React.memo<{ cache?: { file?: CacheFile; request?: CacheRequ
|
||||
const ArtistImage = React.memo<ArtistCoverArtProps>(props => {
|
||||
const cache = useArtistArtFile(props.artistId, props.size)
|
||||
|
||||
return <ImageSource cache={cache} {...props} />
|
||||
return <ImageSource cache={cache} {...props} imageStyle={{ ...styles.artistImage, ...props.imageStyle }} />
|
||||
})
|
||||
|
||||
const CoverArtImage = React.memo<CoverArtProps>(props => {
|
||||
@@ -100,6 +95,9 @@ const styles = StyleSheet.create({
|
||||
width: '100%',
|
||||
position: 'absolute',
|
||||
},
|
||||
artistImage: {
|
||||
backgroundColor: 'rgba(81, 28, 99, 0.4)',
|
||||
},
|
||||
})
|
||||
|
||||
export default CoverArt
|
||||
|
||||
Reference in New Issue
Block a user