mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-03-10 11:36:18 +00:00
fix: make the next episode button work with skip credits button
This commit is contained in:
@@ -689,12 +689,7 @@ export const Controls: React.FC<Props> = ({
|
||||
<Text className="text-xs opacity-50">{item?.Album}</Text>
|
||||
)}
|
||||
</View>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "column",
|
||||
alignSelf: "flex-end",
|
||||
}}
|
||||
>
|
||||
<View className="flex flex-row space-x-2">
|
||||
<SkipButton
|
||||
showButton={showSkipButton}
|
||||
onPress={skipIntro}
|
||||
|
||||
@@ -66,12 +66,12 @@ const NextEpisodeCountDownButton: React.FC<NextEpisodeCountDownButtonProps> = ({
|
||||
|
||||
return (
|
||||
<TouchableOpacity
|
||||
className="w-32 overflow-hidden rounded-md bg-neutral-900"
|
||||
className="w-32 overflow-hidden rounded-md bg-black/60 border border-neutral-900"
|
||||
{...props}
|
||||
onPress={handlePress}
|
||||
>
|
||||
<Animated.View style={animatedStyle} />
|
||||
<View className="px-2 py-3">
|
||||
<View className="px-3 py-3">
|
||||
<Text className="text-center font-bold">Next Episode</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { View, TouchableOpacity, Text, StyleSheet } from "react-native";
|
||||
import { View, TouchableOpacity, Text, ViewProps } from "react-native";
|
||||
|
||||
interface SkipButtonProps {
|
||||
interface SkipButtonProps extends ViewProps {
|
||||
onPress: () => void;
|
||||
showButton: boolean;
|
||||
buttonText: string;
|
||||
@@ -11,29 +11,18 @@ const SkipButton: React.FC<SkipButtonProps> = ({
|
||||
onPress,
|
||||
showButton,
|
||||
buttonText,
|
||||
...props
|
||||
}) => {
|
||||
return (
|
||||
<View style={{ display: showButton ? "flex" : "none" }}>
|
||||
<TouchableOpacity onPress={onPress} style={styles.button}>
|
||||
<Text style={styles.text}>{buttonText}</Text>
|
||||
<View className={showButton ? "flex" : "hidden"} {...props}>
|
||||
<TouchableOpacity
|
||||
onPress={onPress}
|
||||
className="bg-black/60 rounded-md px-3 py-3 border border-neutral-900"
|
||||
>
|
||||
<Text className="text-white font-bold">{buttonText}</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
button: {
|
||||
backgroundColor: "rgba(0, 0, 0, 0.75)",
|
||||
borderRadius: 5,
|
||||
paddingHorizontal: 10,
|
||||
paddingVertical: 15,
|
||||
borderWidth: 2,
|
||||
borderColor: "#5A5454",
|
||||
},
|
||||
text: {
|
||||
color: "white",
|
||||
fontWeight: "bold",
|
||||
},
|
||||
});
|
||||
|
||||
export default SkipButton;
|
||||
|
||||
Reference in New Issue
Block a user