Skip to content

Commit

Permalink
Merge pull request #4365 from EdgeApp/paul/headerTestability
Browse files Browse the repository at this point in the history
Fix android header maestro tappability
  • Loading branch information
paullinator authored Aug 7, 2023
2 parents 8bbcc53 + 94cfc73 commit cd35011
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,9 @@ PODS:
- React-Core
- react-native-in-app-review (4.3.3):
- React-Core
- react-native-is-maestro (2.1.0):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- react-native-mail (6.1.1):
- React-Core
- react-native-mymonero-core (0.3.1):
Expand Down Expand Up @@ -861,6 +864,7 @@ DEPENDENCIES:
- react-native-get-random-values (from `../node_modules/react-native-get-random-values`)
- react-native-image-picker (from `../node_modules/react-native-image-picker`)
- react-native-in-app-review (from `../node_modules/react-native-in-app-review`)
- react-native-is-maestro (from `../node_modules/react-native-is-maestro`)
- react-native-mail (from `../node_modules/react-native-mail`)
- react-native-mymonero-core (from `../node_modules/react-native-mymonero-core`)
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
Expand Down Expand Up @@ -1054,6 +1058,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-image-picker"
react-native-in-app-review:
:path: "../node_modules/react-native-in-app-review"
react-native-is-maestro:
:path: "../node_modules/react-native-is-maestro"
react-native-mail:
:path: "../node_modules/react-native-mail"
react-native-mymonero-core:
Expand Down Expand Up @@ -1239,6 +1245,7 @@ SPEC CHECKSUMS:
react-native-get-random-values: dee677497c6a740b71e5612e8dbd83e7539ed5bb
react-native-image-picker: db60857e03d63721f19b6f4027de20429ddd9cba
react-native-in-app-review: db8bb167a5f238e7ceca5c242d6b36ce8c4404a4
react-native-is-maestro: b1e44ada6a8dbaf6b2e0b112bd381d5dd9d35d67
react-native-mail: 8fdcd3aef007c33a6877a18eb4cf7447a1d4ce4a
react-native-mymonero-core: 780bf854f27a0a905bcef5e7757d2de0a15b4408
react-native-netinfo: 3671b091c4843fda5e153612866ef4024b8f5d62
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
"react-native-haptic-feedback": "^1.14.0",
"react-native-image-picker": "^5.6.0",
"react-native-in-app-review": "^4.3.3",
"react-native-is-maestro": "^2.1.0",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-linear-gradient": "^2.5.6",
"react-native-localize": "^3.0.2",
Expand Down
5 changes: 5 additions & 0 deletions src/components/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { HeaderTitleProps } from '@react-navigation/elements'
import { DefaultTheme, NavigationContainer, useNavigation } from '@react-navigation/native'
import { createStackNavigator, StackNavigationOptions } from '@react-navigation/stack'
import * as React from 'react'
import { Platform } from 'react-native'
import { AirshipToast } from 'react-native-airship'
import { isMaestro } from 'react-native-is-maestro'

import { checkEnabledExchanges } from '../actions/CryptoExchangeActions'
import { logoutRequest } from '../actions/LoginActions'
Expand Down Expand Up @@ -203,12 +205,15 @@ const Drawer = createDrawerNavigator<AppParamList>()
const Stack = createStackNavigator<AppParamList>()
const Tab = createBottomTabNavigator<AppParamList>()

const headerMode = isMaestro() && Platform.OS === 'android' ? 'float' : undefined

const defaultScreenOptions: StackNavigationOptions = {
title: '',
headerTitle: ({ children }: HeaderTitleProps) => <HeaderTitle title={children} />,
headerLeft: () => <BackButton />,
headerRight: () => <SideMenuButton />,
headerShown: true,
headerMode,
headerTitleAlign: 'center',
headerTransparent: true
}
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13689,6 +13689,11 @@ react-native-iphone-x-helper@^1.0.3:
resolved "https://registry.yarnpkg.com/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.2.0.tgz#9f8a376eb00bc712115abff4420318a0063fa796"
integrity sha512-xIeTo4s77wwKgBZLVRIZC9tM9/PkXS46Ul76NXmvmixEb3ZwqGdQesR3zRiLMOoIdfOURB6N9bba9po7+x9Bag==

react-native-is-maestro@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/react-native-is-maestro/-/react-native-is-maestro-2.1.0.tgz#5c8f7b9405f10c984f1bc450eef8cc4f6d7c631c"
integrity sha512-mceBJ+QPOiLvwnXePvrAyctr3jNEZGjysL1pnM3eqxlPNgykIbEnyL/hwR4+UFlNqCTDwKqz0ZwDdCSSXjW3pQ==

react-native-keyboard-aware-scroll-view@^0.9.5:
version "0.9.5"
resolved "https://registry.yarnpkg.com/react-native-keyboard-aware-scroll-view/-/react-native-keyboard-aware-scroll-view-0.9.5.tgz#e2e9665d320c188e6b1f22f151b94eb358bf9b71"
Expand Down

0 comments on commit cd35011

Please sign in to comment.