diff --git a/App.tsx b/App.tsx index 0706f852b..e371db656 100644 --- a/App.tsx +++ b/App.tsx @@ -233,9 +233,12 @@ export default class App extends React.PureComponent { }} > ({ + headerShown: false, + animation: ( + route.params as any + )?.animation + })} screenListeners={({ navigation }) => ({ @@ -299,10 +302,6 @@ export default class App extends React.PureComponent { | TextProps | HeaderIcon; containerStyle?: ViewStyle; placement?: 'left' | 'center' | 'right' | undefined; - navigation?: any; + navigation?: StackNavigationProp; onBack?: () => void; navigateBackOnBackPress?: boolean; } @@ -46,7 +47,7 @@ function ZeusHeader(props: HeaderProps) { onPress={() => { if (onBack) onBack(); if (navigateBackOnBackPress) { - props.navigation.goBack(); + props.navigation!.goBack(); } }} accessibilityLabel={localeString('general.goBack')} @@ -64,7 +65,7 @@ function ZeusHeader(props: HeaderProps) { { if (onBack) onBack(); - props.navigation.goBack(); + props.navigation!.goBack(); }} accessibilityLabel={localeString('general.close')} > diff --git a/components/WalletHeader.tsx b/components/WalletHeader.tsx index 576a383e1..371425419 100644 --- a/components/WalletHeader.tsx +++ b/components/WalletHeader.tsx @@ -126,7 +126,9 @@ const SettingsBadge = ({ navigation: StackNavigationProp; }) => ( navigation.navigate('Settings')} + onPress={() => + navigation.navigate('Settings', { animation: 'slide_from_left' }) + } accessibilityLabel={localeString('views.Settings.title')} > @@ -252,7 +254,11 @@ export default class WalletHeader extends React.Component< const NodeButton = () => ( protectedNavigation(navigation, 'Nodes')} + onPress={() => + protectedNavigation(navigation, 'Nodes', undefined, { + animation: 'slide_from_right' + }) + } accessibilityLabel={localeString('views.Settings.title')} > {selectedNode && selectedNode.photo ? ( @@ -442,7 +448,7 @@ export default class WalletHeader extends React.Component< leftComponent={ loading ? undefined : ( - + {paid && paid.length > 0 && ( @@ -564,7 +570,7 @@ export default class WalletHeader extends React.Component< )} - + {posEnabled !== PosEnabled.Disabled && ( , route: string, - disactivatePOS?: boolean + disactivatePOS?: boolean, + routeParams?: any ) => { const { posStatus, settings, setPosStatus } = stores.settingsStore; const loginRequired = settings && (settings.passphrase || settings.pin); @@ -17,7 +18,7 @@ const protectedNavigation = async ( }); } else { if (disactivatePOS) setPosStatus('inactive'); - navigation.navigate(route); + navigation.navigate(route, routeParams); } }; diff --git a/views/Activity/Activity.tsx b/views/Activity/Activity.tsx index 6fdb88e7b..47479c112 100644 --- a/views/Activity/Activity.tsx +++ b/views/Activity/Activity.tsx @@ -214,7 +214,11 @@ export default class Activity extends React.PureComponent< const FilterButton = () => ( navigation.navigate('ActivityFilter')} + onPress={() => + navigation.navigate('ActivityFilter', { + animation: 'slide_from_right' + }) + } accessibilityLabel={localeString('views.ActivityFilter.title')} > diff --git a/views/Wallet/Wallet.tsx b/views/Wallet/Wallet.tsx index c9d715cf6..51c79bb43 100644 --- a/views/Wallet/Wallet.tsx +++ b/views/Wallet/Wallet.tsx @@ -452,7 +452,7 @@ export default class Wallet extends React.Component { } } - if (connecting) { + if (connecting && start != null) { console.log( 'connect time: ' + (new Date().getTime() - start) / 1000 + 's' ); @@ -490,7 +490,6 @@ export default class Wallet extends React.Component { const Tab = createBottomTabNavigator(); const { NodeInfoStore, - UnitsStore, BalanceStore, SettingsStore, SyncStore, @@ -551,8 +550,6 @@ export default class Wallet extends React.Component { <> this.getSettingsAndNavigate()} locked={isSyncing} consolidated @@ -576,7 +573,8 @@ export default class Wallet extends React.Component { this.props.navigation.navigate( - 'Activity' + 'Activity', + { animation: 'slide_from_bottom' } ) } accessibilityLabel={localeString( @@ -635,6 +633,7 @@ export default class Wallet extends React.Component { ...DefaultTheme, colors: { ...DefaultTheme.colors, + background: themeColor('background'), card: error ? themeColor('error') : themeColor('background'), border: error ? themeColor('error') : themeColor('background') } @@ -648,7 +647,6 @@ export default class Wallet extends React.Component { { ? themeColor('error') : 'gray', tabBarShowLabel: false, - tabBarStyle: { display: 'flex' } + tabBarStyle: { + paddingBottom: 12 + }, + animation: 'shift' })} > {posEnabled !== PosEnabled.Disabled &&