mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-04-25 02:23:11 +00:00
removed communtiy blur from android
This commit is contained in:
parent
2a320e5a00
commit
79cf375b60
2 changed files with 19 additions and 28 deletions
|
|
@ -5,8 +5,6 @@ import { useNavigation, useRoute } from '@react-navigation/native';
|
||||||
import type { NativeStackNavigationProp } from '@react-navigation/native-stack';
|
import type { NativeStackNavigationProp } from '@react-navigation/native-stack';
|
||||||
import type { RootStackParamList } from '../navigation/AppNavigator';
|
import type { RootStackParamList } from '../navigation/AppNavigator';
|
||||||
import { BlurView as ExpoBlurView } from 'expo-blur';
|
import { BlurView as ExpoBlurView } from 'expo-blur';
|
||||||
import { BlurView as CommunityBlurView } from '@react-native-community/blur';
|
|
||||||
import Constants, { ExecutionEnvironment } from 'expo-constants';
|
|
||||||
import { useTheme } from '../contexts/ThemeContext';
|
import { useTheme } from '../contexts/ThemeContext';
|
||||||
|
|
||||||
type NavigationProp = NativeStackNavigationProp<RootStackParamList>;
|
type NavigationProp = NativeStackNavigationProp<RootStackParamList>;
|
||||||
|
|
@ -21,28 +19,17 @@ export const NuvioHeader = () => {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine if running in Expo Go
|
|
||||||
const isExpoGo = Constants.executionEnvironment === ExecutionEnvironment.StoreClient;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<View style={styles.headerContainer}>
|
<View style={[
|
||||||
|
styles.headerContainer,
|
||||||
|
Platform.OS === 'android' && { backgroundColor: currentTheme.colors.darkBackground }
|
||||||
|
]}>
|
||||||
{Platform.OS === 'ios' ? (
|
{Platform.OS === 'ios' ? (
|
||||||
<ExpoBlurView intensity={60} style={styles.blurOverlay} tint="dark" />
|
<ExpoBlurView intensity={60} style={styles.blurOverlay} tint="dark" />
|
||||||
) : (
|
) : (
|
||||||
isExpoGo ? (
|
// Android: solid themed background instead of blur/transparent overlay
|
||||||
<View style={[styles.androidBlurContainer, styles.androidFallbackBlur]} />
|
<View style={[styles.androidBlurContainer, { backgroundColor: currentTheme.colors.darkBackground }]} />
|
||||||
) : (
|
|
||||||
<View style={styles.androidBlurContainer}>
|
|
||||||
<CommunityBlurView
|
|
||||||
style={styles.androidBlur}
|
|
||||||
blurType="dark"
|
|
||||||
blurAmount={8}
|
|
||||||
overlayColor="rgba(0,0,0,0.4)"
|
|
||||||
reducedTransparencyFallbackColor="black"
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
)
|
|
||||||
)}
|
)}
|
||||||
<View style={styles.contentContainer}>
|
<View style={styles.contentContainer}>
|
||||||
<View style={styles.logoContainer}>
|
<View style={styles.logoContainer}>
|
||||||
|
|
@ -56,7 +43,13 @@ export const NuvioHeader = () => {
|
||||||
style={styles.searchButton}
|
style={styles.searchButton}
|
||||||
onPress={() => navigation.navigate('Search')}
|
onPress={() => navigation.navigate('Search')}
|
||||||
>
|
>
|
||||||
<View style={styles.iconWrapper}>
|
<View style={[
|
||||||
|
styles.iconWrapper,
|
||||||
|
{
|
||||||
|
backgroundColor: currentTheme.colors.transparentLight,
|
||||||
|
borderColor: currentTheme.colors.border
|
||||||
|
}
|
||||||
|
]}>
|
||||||
<MaterialCommunityIcons
|
<MaterialCommunityIcons
|
||||||
name="magnify"
|
name="magnify"
|
||||||
size={24}
|
size={24}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import {
|
||||||
Dimensions,
|
Dimensions,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { BlurView as ExpoBlurView } from 'expo-blur';
|
import { BlurView as ExpoBlurView } from 'expo-blur';
|
||||||
import { BlurView as CommunityBlurView } from '@react-native-community/blur';
|
|
||||||
import { MaterialIcons } from '@expo/vector-icons';
|
import { MaterialIcons } from '@expo/vector-icons';
|
||||||
import { Image } from 'expo-image';
|
import { Image } from 'expo-image';
|
||||||
import Animated, {
|
import Animated, {
|
||||||
|
|
@ -114,13 +113,12 @@ const FloatingHeader: React.FC<FloatingHeaderProps> = ({
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
</ExpoBlurView>
|
</ExpoBlurView>
|
||||||
) : (
|
) : (
|
||||||
<View style={[styles.blurContainer, { paddingTop: Math.max(safeAreaTop * 0.8, safeAreaTop - 6) }]}>
|
<View
|
||||||
<CommunityBlurView
|
style={[
|
||||||
style={styles.absoluteFill}
|
styles.blurContainer,
|
||||||
blurType="dark"
|
{ paddingTop: Math.max(safeAreaTop * 0.8, safeAreaTop - 6), backgroundColor: currentTheme.colors.darkBackground }
|
||||||
blurAmount={15}
|
]}
|
||||||
reducedTransparencyFallbackColor="rgba(20, 20, 20, 0.9)"
|
>
|
||||||
/>
|
|
||||||
<Animated.View style={[styles.floatingHeaderContent, headerElementsStyle]}>
|
<Animated.View style={[styles.floatingHeaderContent, headerElementsStyle]}>
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={styles.backButton}
|
style={styles.backButton}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue