Fix crash on group selection
This commit is contained in:
parent
ac59121609
commit
c52fa3a7d8
1 changed files with 15 additions and 12 deletions
|
@ -261,8 +261,19 @@ class PlanexScreen extends React.Component<Props, State> {
|
||||||
};
|
};
|
||||||
|
|
||||||
getWebView() {
|
getWebView() {
|
||||||
if (this.state.currentGroup.id !== -1) {
|
const showWebview = this.state.currentGroup.id !== -1;
|
||||||
return (
|
|
||||||
|
return (
|
||||||
|
<View style={{height: '100%'}}>
|
||||||
|
{!showWebview
|
||||||
|
? <ErrorView
|
||||||
|
{...this.props}
|
||||||
|
icon={'account-clock'}
|
||||||
|
message={i18n.t("planexScreen.noGroupSelected")}
|
||||||
|
showRetryButton={false}
|
||||||
|
/>
|
||||||
|
: null}
|
||||||
|
|
||||||
<WebViewScreen
|
<WebViewScreen
|
||||||
ref={this.webScreenRef}
|
ref={this.webScreenRef}
|
||||||
navigation={this.props.navigation}
|
navigation={this.props.navigation}
|
||||||
|
@ -271,16 +282,8 @@ class PlanexScreen extends React.Component<Props, State> {
|
||||||
onMessage={this.onMessage}
|
onMessage={this.onMessage}
|
||||||
onScroll={this.onScroll}
|
onScroll={this.onScroll}
|
||||||
/>
|
/>
|
||||||
);
|
</View>
|
||||||
} else {
|
);
|
||||||
return <ErrorView
|
|
||||||
{...this.props}
|
|
||||||
icon={'account-clock'}
|
|
||||||
message={i18n.t("planexScreen.noGroupSelected")}
|
|
||||||
showRetryButton={false}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
Loading…
Reference in a new issue