Skip to content

Commit 060b03b

Browse files
committed
Revert "Replace manual scroll header with native iOS 26 scrollEdgeEffects"
This reverts commit 2159db3.
1 parent 2159db3 commit 060b03b

3 files changed

Lines changed: 35 additions & 5 deletions

File tree

App.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,15 @@ export default function App() {
153153
title: Constants.expoConfig.name,
154154
headerLargeTitleShadowVisible: false,
155155
headerLargeTitle: true,
156+
// headerLargeStyle: {
157+
// backgroundColor: colors.background,
158+
// },
156159
headerTransparent: true,
160+
// headerStyle: {
161+
// backgroundColor: colors.opaqueHeader,
162+
// },
163+
// headerBlurEffect: 'prominent',
164+
// headerTransparent: true,
157165
}}
158166
/>
159167
<Stack.Screen
@@ -164,7 +172,11 @@ export default function App() {
164172
headerBackButtonDisplayMode: 'minimal',
165173
title: '',
166174
headerTransparent: true,
167-
scrollEdgeEffects: { top: 'automatic' },
175+
// headerShadowVisible: false,
176+
// headerStyle: {
177+
// backgroundColor: colors.background,
178+
// },
179+
// headerTransparent: true,
168180
}}
169181
/>
170182
<Stack.Screen
@@ -194,7 +206,6 @@ export default function App() {
194206
presentation: 'modal',
195207
headerTransparent: true,
196208
headerShadowVisible: false,
197-
scrollEdgeEffects: { top: 'automatic' },
198209
}}
199210
/>
200211
<Stack.Screen
@@ -203,7 +214,6 @@ export default function App() {
203214
options={{
204215
// headerShown: false,
205216
headerTransparent: true,
206-
scrollEdgeEffects: { top: 'automatic' },
207217
title: '',
208218
headerRight: () => (
209219
<TouchableOpacity
@@ -289,7 +299,6 @@ export default function App() {
289299
// backgroundColor: colors.background2,
290300
// },
291301
headerTransparent: true,
292-
scrollEdgeEffects: { top: 'automatic' },
293302
contentStyle: {
294303
backgroundColor: colors.background2,
295304
},
@@ -323,7 +332,7 @@ export default function App() {
323332
options={{
324333
presentation: 'modal',
325334
headerTransparent: true,
326-
scrollEdgeEffects: { top: 'automatic' },
335+
headerShadowVisible: false,
327336
headerTitle: () => (
328337
<View>
329338
<Text bold size="title3">

hooks/useTheme.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default () => {
1616
isDark ? 'systemBackground' : 'secondarySystemBackground',
1717
),
1818
modalBackground: PlatformColor('systemBackground'), // weird thing on iOS
19+
opaqueHeader: 'rgba(0,0,0,0.002)',
1920
opaqueBackground: isDark ? 'rgba(255,255,255,.05)' : 'rgba(0,0,0,.05)',
2021
opaqueBackground2: isDark ? 'rgba(255,255,255,.1)' : 'rgba(0,0,0,.1)',
2122
opaqueBackground3: isDark ? 'rgba(255,255,255,.25)' : 'rgba(0,0,0,.25)',

screens/StoryScreen.jsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,10 @@ export default function StoryScreen({ route, navigation }) {
531531
const scrolledDown = useRef(false);
532532
const commentsNavOptions = useRef({
533533
title: '',
534+
// headerShadowVisible: false,
535+
// headerStyle: {
536+
// backgroundColor: colors.background,
537+
// },
534538
});
535539
const onScroll = useCallback(
536540
(e) => {
@@ -541,6 +545,15 @@ export default function StoryScreen({ route, navigation }) {
541545
scrolledDown.current = scrolled;
542546
const options = {
543547
title: scrolled ? title : '',
548+
// headerShadowVisible: scrolled,
549+
// headerBlurEffect: scrolled ? 'prominent' : '',
550+
// headerStyle: scrolled
551+
// ? {
552+
// backgroundColor: colors.opaqueHeader,
553+
// }
554+
// : {
555+
// backgroundColor: colors.background,
556+
// },
544557
};
545558
navigation.setOptions(options);
546559
commentsNavOptions.current = options;
@@ -563,10 +576,17 @@ export default function StoryScreen({ route, navigation }) {
563576
tabView === 'web'
564577
? {
565578
title: parseURL(navState.url || url).domain || '',
579+
// headerShadowVisible: true,
580+
// headerBlurEffect: 'prominent',
581+
// headerStyle: {
582+
// backgroundColor: colors.opaqueHeader,
583+
// },
584+
// fullScreenGestureEnabled: false,
566585
headerRight: webHeaderRight,
567586
}
568587
: {
569588
...commentsNavOptions.current,
589+
// fullScreenGestureEnabled: true,
570590
headerRight: commentsHeaderRight,
571591
},
572592
);

0 commit comments

Comments
 (0)