FIX: The create wallet screen is not working when I go back after cre…
This commit is contained in:
GLaDOS 2024-01-21 17:14:25 +00:00 committed by GitHub
commit 4c40306b65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,6 +32,7 @@ type NavigationOptions = {
headerLeft?: (() => React.ReactElement) | null; headerLeft?: (() => React.ReactElement) | null;
headerRight?: (() => React.ReactElement) | null; headerRight?: (() => React.ReactElement) | null;
headerBackTitleVisible?: false; headerBackTitleVisible?: false;
headerBackButtonMenuEnabled?: boolean;
headerShadowVisible?: boolean; headerShadowVisible?: boolean;
headerTintColor?: string; headerTintColor?: string;
title?: string; title?: string;
@ -45,7 +46,7 @@ const navigationStyle = (
{ {
closeButton = false, closeButton = false,
closeButtonFunc, closeButtonFunc,
headerBackVisible = true, headerBackVisible,
...opts ...opts
}: NavigationOptions & { }: NavigationOptions & {
closeButton?: boolean; closeButton?: boolean;
@ -57,6 +58,7 @@ const navigationStyle = (
return theme => return theme =>
({ navigation, route }) => { ({ navigation, route }) => {
let headerRight; let headerRight;
let headerLeft;
if (closeButton) { if (closeButton) {
const handleClose = closeButtonFunc const handleClose = closeButtonFunc
? () => closeButtonFunc({ navigation, route }) ? () => closeButtonFunc({ navigation, route })
@ -77,6 +79,13 @@ const navigationStyle = (
); );
} }
// Workaround for https://github.com/BlueWallet/BlueWallet/issues/6030
if (!headerBackVisible) {
headerLeft = () => <></>;
opts.headerLeft = headerLeft;
}
//
let options: NavigationOptions = { let options: NavigationOptions = {
headerShadowVisible: false, headerShadowVisible: false,
headerTitleStyle: { headerTitleStyle: {