[FIX] Showing blank screen on share extension if the user is not logged in (#4207)
* [FIX] Redirect not logged users to WithoutServersView * minor tweak * [FIX] Redirect not logged users to WithoutServersView * minor tweak * fix the init * update yarn.lock Co-authored-by: Alex Junior <alexalexandrejr@gmail.com>
This commit is contained in:
parent
992e43815d
commit
53aaae5d82
|
@ -91,6 +91,8 @@ export const App = ({ root }: any) => (
|
|||
);
|
||||
|
||||
class Root extends React.Component<{}, IState> {
|
||||
private mounted = false;
|
||||
|
||||
constructor(props: any) {
|
||||
super(props);
|
||||
const { width, height, scale, fontScale } = Dimensions.get('screen');
|
||||
|
@ -107,6 +109,10 @@ class Root extends React.Component<{}, IState> {
|
|||
this.init();
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.mounted = true;
|
||||
}
|
||||
|
||||
componentWillUnmount(): void {
|
||||
closeShareExtension();
|
||||
unsubscribeTheme();
|
||||
|
@ -119,8 +125,11 @@ class Root extends React.Component<{}, IState> {
|
|||
await localAuthenticate(currentServer);
|
||||
this.setState({ root: 'inside' });
|
||||
await shareExtensionInit(currentServer);
|
||||
} else {
|
||||
} else if (this.mounted) {
|
||||
this.setState({ root: 'outside' });
|
||||
} else {
|
||||
// @ts-ignore
|
||||
this.state.root = 'outside';
|
||||
}
|
||||
|
||||
const state = Navigation.navigationRef.current?.getRootState();
|
||||
|
|
|
@ -8014,7 +8014,7 @@ detect-port@^1.3.0:
|
|||
address "^1.0.1"
|
||||
debug "^2.6.0"
|
||||
|
||||
detox@^19.7.0:
|
||||
detox@19.7.0:
|
||||
version "19.7.0"
|
||||
resolved "https://registry.yarnpkg.com/detox/-/detox-19.7.0.tgz#278994beb98b959d21f1d4f393c628005c893122"
|
||||
integrity sha512-70a6IQCBQCJI21ITdK+qGUQ7fQL/CeOW+i0Vdr0ZFN5B5RylSE9d5shoJBtg2nb8XYG+S9BLqhn+uE02Nqymng==
|
||||
|
|
Loading…
Reference in New Issue