mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Make the back button of the player goBack instead of going to the details page
This commit is contained in:
parent
a8ab835365
commit
d4ab42d98f
@ -25,7 +25,6 @@ import {
|
|||||||
H1,
|
H1,
|
||||||
H2,
|
H2,
|
||||||
IconButton,
|
IconButton,
|
||||||
Link,
|
|
||||||
Poster,
|
Poster,
|
||||||
PressableFeedback,
|
PressableFeedback,
|
||||||
Skeleton,
|
Skeleton,
|
||||||
@ -35,15 +34,7 @@ import {
|
|||||||
} from "@kyoo/primitives";
|
} from "@kyoo/primitives";
|
||||||
import { Chapter, KyooImage, Subtitle, Audio } from "@kyoo/models";
|
import { Chapter, KyooImage, Subtitle, Audio } from "@kyoo/models";
|
||||||
import { useAtomValue, useSetAtom, useAtom } from "jotai";
|
import { useAtomValue, useSetAtom, useAtom } from "jotai";
|
||||||
import {
|
import { ImageStyle, Platform, Pressable, View, ViewProps } from "react-native";
|
||||||
ImageStyle,
|
|
||||||
Platform,
|
|
||||||
Pressable,
|
|
||||||
View,
|
|
||||||
ViewProps,
|
|
||||||
PointerEvent as NativePointerEvent,
|
|
||||||
GestureResponderEvent,
|
|
||||||
} from "react-native";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { percent, rem, useYoshiki } from "yoshiki/native";
|
import { percent, rem, useYoshiki } from "yoshiki/native";
|
||||||
import { useRouter } from "solito/router";
|
import { useRouter } from "solito/router";
|
||||||
@ -127,7 +118,6 @@ export const Hover = ({
|
|||||||
<Back
|
<Back
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
name={showName}
|
name={showName}
|
||||||
href={href}
|
|
||||||
{...css({
|
{...css({
|
||||||
pointerEvents: "auto",
|
pointerEvents: "auto",
|
||||||
})}
|
})}
|
||||||
@ -336,9 +326,8 @@ const ProgressBar = ({ chapters }: { chapters?: Chapter[] }) => {
|
|||||||
export const Back = ({
|
export const Back = ({
|
||||||
isLoading,
|
isLoading,
|
||||||
name,
|
name,
|
||||||
href,
|
|
||||||
...props
|
...props
|
||||||
}: { isLoading: boolean; name?: string; href?: string } & ViewProps) => {
|
}: { isLoading: boolean; name?: string } & ViewProps) => {
|
||||||
const { css } = useYoshiki();
|
const { css } = useYoshiki();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -363,9 +352,8 @@ export const Back = ({
|
|||||||
>
|
>
|
||||||
<IconButton
|
<IconButton
|
||||||
icon={ArrowBack}
|
icon={ArrowBack}
|
||||||
{...(href
|
as={PressableFeedback}
|
||||||
? { as: Link as any, href: href }
|
onPress={router.back}
|
||||||
: { as: PressableFeedback, onPress: router.back })}
|
|
||||||
{...tooltip(t("player.back"))}
|
{...tooltip(t("player.back"))}
|
||||||
/>
|
/>
|
||||||
<Skeleton>
|
<Skeleton>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user