mirror of
https://github.com/Jellify-Music/App.git
synced 2026-03-12 15:09:00 -05:00
Make the flatlist render faster?
This commit is contained in:
@@ -10,7 +10,8 @@ export function fetchItemImage(itemId: string, imageType?: ImageType, size?: num
|
||||
.getItemImage({
|
||||
itemId,
|
||||
imageType: imageType ? imageType : ImageType.Primary,
|
||||
...QueryConfig.playerArtwork,
|
||||
width: size ?? QueryConfig.playerArtwork.width,
|
||||
height: size ?? QueryConfig.playerArtwork.height
|
||||
}, {
|
||||
responseType: 'blob'
|
||||
})
|
||||
|
||||
@@ -11,7 +11,7 @@ interface BlurhashLoadingProps {
|
||||
|
||||
export default function BlurhashedImage({ item, size, type }: { item: BaseItemDto, size: number, type?: ImageType }) : React.JSX.Element {
|
||||
|
||||
const { data: image, isSuccess } = useItemImage(item.Id!, type);
|
||||
const { data: image, isSuccess } = useItemImage(item.Id!, type, size);
|
||||
|
||||
const blurhash = !isEmpty(item.ImageBlurHashes)
|
||||
&& !isEmpty(item.ImageBlurHashes.Primary)
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function TrackOptions({
|
||||
onPress={() => {
|
||||
|
||||
if (isNested)
|
||||
navigation.goBack();
|
||||
navigation.getParent()!.goBack();
|
||||
|
||||
navigation.goBack();
|
||||
navigation.push("Album", {
|
||||
|
||||
@@ -4,10 +4,10 @@ import { debounce } from "lodash";
|
||||
import Item from "../Global/components/item";
|
||||
import { NativeStackNavigationProp } from "@react-navigation/native-stack";
|
||||
import { StackParamList } from "../types";
|
||||
import { FlatList } from "react-native";
|
||||
import { QueryKeys } from "../../enums/query-keys";
|
||||
import { fetchSearchResults } from "../../api/queries/functions/search";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { FlatList } from "react-native/Libraries/Lists/FlatList";
|
||||
|
||||
export default function Search({
|
||||
navigation
|
||||
|
||||
Reference in New Issue
Block a user