mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-04 22:24:14 -04:00
Differenciate metadata and info skeletons of the player
This commit is contained in:
parent
a1aa71e271
commit
ead8a44fe0
@ -23,7 +23,7 @@ import { Props, YoshikiEnhanced } from "./base-image";
|
|||||||
import { Image } from "./image";
|
import { Image } from "./image";
|
||||||
import { ComponentType, ReactNode } from "react";
|
import { ComponentType, ReactNode } from "react";
|
||||||
import { LinearGradient, LinearGradientProps } from "expo-linear-gradient";
|
import { LinearGradient, LinearGradientProps } from "expo-linear-gradient";
|
||||||
import { ContrastArea, alpha } from "../themes";
|
import { ContrastArea } from "../themes";
|
||||||
import { percent } from "yoshiki/native";
|
import { percent } from "yoshiki/native";
|
||||||
|
|
||||||
export { BlurhashContainer } from "./blurhash";
|
export { BlurhashContainer } from "./blurhash";
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { forwardRef, ReactNode, useState } from "react";
|
import { forwardRef, ReactNode, useState } from "react";
|
||||||
import { Platform, TextInput, TextInputProps, View } from "react-native";
|
import { TextInput, TextInputProps, View } from "react-native";
|
||||||
import { px, Theme, useYoshiki } from "yoshiki/native";
|
import { px, Theme, useYoshiki } from "yoshiki/native";
|
||||||
import { focusReset, ts } from "./utils";
|
import { focusReset, ts } from "./utils";
|
||||||
|
|
||||||
|
@ -69,17 +69,17 @@ const mapData = (
|
|||||||
previousSlug?: string,
|
previousSlug?: string,
|
||||||
nextSlug?: string,
|
nextSlug?: string,
|
||||||
): Partial<ComponentProps<typeof Hover>> & { isLoading: boolean } => {
|
): Partial<ComponentProps<typeof Hover>> & { isLoading: boolean } => {
|
||||||
if (!data || !info) return { isLoading: true };
|
if (!data) return { isLoading: true };
|
||||||
return {
|
return {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
name: data.type === "movie" ? data.name : `${episodeDisplayNumber(data, "")} ${data.name}`,
|
name: data.type === "movie" ? data.name : `${episodeDisplayNumber(data, "")} ${data.name}`,
|
||||||
showName: data.type === "movie" ? data.name! : data.show!.name,
|
showName: data.type === "movie" ? data.name! : data.show!.name,
|
||||||
href: data ? (data.type === "movie" ? `/movie/${data.slug}` : `/show/${data.show!.slug}`) : "#",
|
href: data ? (data.type === "movie" ? `/movie/${data.slug}` : `/show/${data.show!.slug}`) : "#",
|
||||||
poster: data.type === "movie" ? data.poster : data.show!.poster,
|
poster: data.type === "movie" ? data.poster : data.show!.poster,
|
||||||
subtitles: info.subtitles,
|
subtitles: info?.subtitles,
|
||||||
audios: info.audios,
|
audios: info?.audios,
|
||||||
chapters: info.chapters,
|
chapters: info?.chapters,
|
||||||
fonts: info.fonts,
|
fonts: info?.fonts,
|
||||||
previousSlug,
|
previousSlug,
|
||||||
nextSlug,
|
nextSlug,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user