fix: update headerBlurEffect logic for iOS 26

This commit is contained in:
daniel31x13
2026-03-25 13:44:20 -04:00
parent 09f9c81297
commit 74b54fc002
7 changed files with 33 additions and 26 deletions

View File

@@ -2,7 +2,7 @@
"expo": {
"name": "Linkwarden",
"slug": "linkwarden",
"version": "1.2.1",
"version": "1.2.2",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "linkwarden",

View File

@@ -31,8 +31,11 @@ export default function Layout() {
headerIconColor: colorScheme === "dark" ? "white" : "black",
},
headerShadowVisible: false,
headerBlurEffect:
colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
headerBlurEffect: isIOS26Plus
? "none"
: colorScheme === "dark"
? "systemMaterialDark"
: "systemMaterial",
headerLargeStyle: {
backgroundColor: isIOS26Plus
? "transparent"

View File

@@ -18,8 +18,11 @@ export default function Layout() {
headerLargeTitle: true,
headerTransparent: Platform.OS === "ios",
headerShadowVisible: false,
headerBlurEffect:
colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
headerBlurEffect: isIOS26Plus
? "none"
: colorScheme === "dark"
? "systemMaterialDark"
: "systemMaterial",
headerTintColor: colorScheme === "dark" ? "white" : "black",
headerLargeStyle: {
backgroundColor: isIOS26Plus

View File

@@ -31,8 +31,11 @@ export default function Layout() {
headerIconColor: colorScheme === "dark" ? "white" : "black",
},
headerShadowVisible: false,
headerBlurEffect:
colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
headerBlurEffect: isIOS26Plus
? "none"
: colorScheme === "dark"
? "systemMaterialDark"
: "systemMaterial",
headerLargeStyle: {
backgroundColor: isIOS26Plus
? "transparent"

View File

@@ -18,8 +18,11 @@ export default function Layout() {
headerTintColor: colorScheme === "dark" ? "white" : "black",
headerShadowVisible: false,
headerBackTitle: "Back",
headerBlurEffect:
colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
headerBlurEffect: isIOS26Plus
? "none"
: colorScheme === "dark"
? "systemMaterialDark"
: "systemMaterial",
headerLargeStyle: {
backgroundColor: isIOS26Plus
? "transparent"
@@ -47,14 +50,11 @@ export default function Layout() {
headerTitle: "Preferred Collection",
headerLargeTitle: false,
headerTransparent: Platform.OS === "ios",
headerBackground: () => (
<View
style={{
flex: 1,
backgroundColor: themeBackgroundColor,
}}
/>
),
headerBlurEffect: isIOS26Plus
? "none"
: colorScheme === "dark"
? "systemMaterialDark"
: "systemMaterial",
headerSearchBarOptions: {
placeholder: "Search Collections",
autoCapitalize: "none",

View File

@@ -8,8 +8,6 @@ import { Folder, Check } from "lucide-react-native";
import { useColorScheme } from "nativewind";
import { rawTheme, ThemeName } from "@/lib/colors";
import { useLocalSearchParams } from "expo-router";
import { useHeaderHeight } from "@react-navigation/elements";
import { useSafeAreaInsets } from "react-native-safe-area-context";
const PreferredCollectionScreen = () => {
const { auth } = useAuthStore();
@@ -20,8 +18,6 @@ const PreferredCollectionScreen = () => {
const [filteredCollections, setFilteredCollections] = useState<
CollectionIncludingMembersAndLinkCount[]
>([]);
const headerHeight = useHeaderHeight();
const insets = useSafeAreaInsets();
useEffect(() => {
const filter =
@@ -80,11 +76,10 @@ const PreferredCollectionScreen = () => {
data={filteredCollections}
keyExtractor={(item) => item.id?.toString() || ""}
renderItem={renderCollection}
contentInsetAdjustmentBehavior="automatic"
contentContainerStyle={{
paddingHorizontal: 16,
flexGrow: 1,
paddingTop: Platform.OS === "ios" ? headerHeight + 10 : 10,
paddingBottom: insets.bottom + 60,
paddingTop: 10,
}}
ListEmptyComponent={
<View

View File

@@ -30,8 +30,11 @@ export default function Layout() {
headerIconColor: colorScheme === "dark" ? "white" : "black",
},
headerShadowVisible: false,
headerBlurEffect:
colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
headerBlurEffect: isIOS26Plus
? "none"
: colorScheme === "dark"
? "systemMaterialDark"
: "systemMaterial",
headerLargeStyle: {
backgroundColor: isIOS26Plus
? "transparent"