Bluesky app fork with some witchin' additions 💫

set proper content style to fix background color (#2575)

* set the proper content style

* lint

authored by

Hailey and committed by
GitHub
89607d90 5522b581

+11 -22
+11 -22
src/Navigation.tsx
··· 1 1 import * as React from 'react' 2 - import {StyleSheet} from 'react-native' 3 2 import { 4 3 NavigationContainer, 5 4 createNavigationContainerRef, ··· 25 24 import {BottomBar} from './view/shell/bottom-bar/BottomBar' 26 25 import {buildStateObject} from 'lib/routes/helpers' 27 26 import {State, RouteParams} from 'lib/routes/types' 28 - import {colors} from 'lib/styles' 29 27 import {isAndroid, isNative} from 'platform/detection' 30 28 import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle' 31 29 import {router} from './routes' ··· 299 297 } 300 298 301 299 function HomeTabNavigator() { 302 - const contentStyle = useColorSchemeStyle(styles.bgLight, styles.bgDark) 300 + const pal = usePalette('default') 303 301 304 302 return ( 305 303 <HomeTab.Navigator ··· 309 307 fullScreenGestureEnabled: true, 310 308 headerShown: false, 311 309 animationDuration: 250, 312 - contentStyle, 310 + contentStyle: pal.view, 313 311 }}> 314 312 <HomeTab.Screen 315 313 name="Home" ··· 322 320 } 323 321 324 322 function SearchTabNavigator() { 325 - const contentStyle = useColorSchemeStyle(styles.bgLight, styles.bgDark) 323 + const pal = usePalette('default') 326 324 return ( 327 325 <SearchTab.Navigator 328 326 screenOptions={{ ··· 331 329 fullScreenGestureEnabled: true, 332 330 headerShown: false, 333 331 animationDuration: 250, 334 - contentStyle, 332 + contentStyle: pal.view, 335 333 }}> 336 334 <SearchTab.Screen name="Search" getComponent={() => SearchScreen} /> 337 335 {commonScreens(SearchTab as typeof HomeTab)} ··· 340 338 } 341 339 342 340 function FeedsTabNavigator() { 343 - const contentStyle = useColorSchemeStyle(styles.bgLight, styles.bgDark) 341 + const pal = usePalette('default') 344 342 return ( 345 343 <FeedsTab.Navigator 346 344 screenOptions={{ ··· 349 347 fullScreenGestureEnabled: true, 350 348 headerShown: false, 351 349 animationDuration: 250, 352 - contentStyle, 350 + contentStyle: pal.view, 353 351 }}> 354 352 <FeedsTab.Screen 355 353 name="Feeds" ··· 362 360 } 363 361 364 362 function NotificationsTabNavigator() { 365 - const contentStyle = useColorSchemeStyle(styles.bgLight, styles.bgDark) 363 + const pal = usePalette('default') 366 364 return ( 367 365 <NotificationsTab.Navigator 368 366 screenOptions={{ ··· 371 369 fullScreenGestureEnabled: true, 372 370 headerShown: false, 373 371 animationDuration: 250, 374 - contentStyle, 372 + contentStyle: pal.view, 375 373 }}> 376 374 <NotificationsTab.Screen 377 375 name="Notifications" ··· 384 382 } 385 383 386 384 function MyProfileTabNavigator() { 387 - const contentStyle = useColorSchemeStyle(styles.bgLight, styles.bgDark) 385 + const pal = usePalette('default') 388 386 return ( 389 387 <MyProfileTab.Navigator 390 388 screenOptions={{ ··· 393 391 fullScreenGestureEnabled: true, 394 392 headerShown: false, 395 393 animationDuration: 250, 396 - contentStyle, 394 + contentStyle: pal.view, 397 395 }}> 398 396 <MyProfileTab.Screen 399 397 // @ts-ignore // TODO: fix this broken type in ProfileScreen ··· 424 422 fullScreenGestureEnabled: true, 425 423 headerShown: false, 426 424 animationDuration: 250, 427 - contentStyle: [pal.view], 425 + contentStyle: pal.view, 428 426 }}> 429 427 <Flat.Screen 430 428 name="Home" ··· 619 617 navigate(name, params) 620 618 } 621 619 } 622 - 623 - const styles = StyleSheet.create({ 624 - bgDark: { 625 - backgroundColor: colors.black, 626 - }, 627 - bgLight: { 628 - backgroundColor: colors.white, 629 - }, 630 - }) 631 620 632 621 let didInit = false 633 622 function logModuleInitTime() {