mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 23:08:07 +01:00
Merge pull request #6763 from BlueWallet/Buttons-are-in-wrong-position-when-using-RTL-language-#6758
FIX: Buttons are in wrong position when using RTL language #6758
This commit is contained in:
commit
aa712bd0b6
1 changed files with 11 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
import React, { useCallback, useMemo } from 'react';
|
||||
import { NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
||||
import { I18nManager, View } from 'react-native';
|
||||
import { View } from 'react-native';
|
||||
import { isDesktop } from '../blue_modules/environment';
|
||||
import HeaderRightButton from '../components/HeaderRightButton';
|
||||
import navigationStyle, { CloseButtonPosition } from '../components/navigationStyle';
|
||||
|
@ -78,27 +78,31 @@ const DetailViewStackScreensStack = () => {
|
|||
navigation.navigate('AddWalletRoot');
|
||||
}, [navigation]);
|
||||
|
||||
const useWalletListScreenOptions = useMemo<NativeStackNavigationOptions>(() => {
|
||||
const RightBarButtons = (
|
||||
const RightBarButtons = useMemo(
|
||||
() => (
|
||||
<>
|
||||
<PlusIcon accessibilityRole="button" accessibilityLabel={loc.wallets.add_title} onPress={navigateToAddWallet} />
|
||||
<View style={styles.width24} />
|
||||
<SettingsButton />
|
||||
</>
|
||||
);
|
||||
),
|
||||
[navigateToAddWallet],
|
||||
);
|
||||
|
||||
const useWalletListScreenOptions = useMemo<NativeStackNavigationOptions>(() => {
|
||||
return {
|
||||
title: loc.wallets.wallets,
|
||||
navigationBarColor: theme.colors.navigationBarColor,
|
||||
headerShown: !isDesktop,
|
||||
headerLargeTitle: true,
|
||||
headerShadowVisible: false,
|
||||
headerLargeTitleShadowVisible: false,
|
||||
headerStyle: {
|
||||
backgroundColor: theme.colors.customHeader,
|
||||
},
|
||||
headerRight: I18nManager.isRTL ? undefined : () => RightBarButtons,
|
||||
headerLeft: I18nManager.isRTL ? () => RightBarButtons : undefined,
|
||||
headerRight: () => RightBarButtons,
|
||||
};
|
||||
}, [navigateToAddWallet, theme.colors.customHeader, theme.colors.navigationBarColor]);
|
||||
}, [RightBarButtons, theme.colors.customHeader, theme.colors.navigationBarColor]);
|
||||
|
||||
const walletListScreenOptions = useWalletListScreenOptions;
|
||||
return (
|
||||
|
|
Loading…
Add table
Reference in a new issue