From d654a5d7a854b00e21f6339ffc2b5196b37ac70c Mon Sep 17 00:00:00 2001 From: keplyx Date: Thu, 30 Jan 2020 18:27:51 +0100 Subject: [PATCH] Improved Planex display and webview fullscreen --- components/BaseContainer.js | 5 +++-- components/WebViewScreen.js | 3 ++- screens/Websites/PlanexScreen.js | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/components/BaseContainer.js b/components/BaseContainer.js index e0935c9..38ba60a 100644 --- a/components/BaseContainer.js +++ b/components/BaseContainer.js @@ -5,7 +5,7 @@ import {Container} from "native-base"; import CustomHeader from "./CustomHeader"; import CustomSideMenu from "./CustomSideMenu"; import CustomMaterialIcon from "./CustomMaterialIcon"; -import {Platform, View} from "react-native"; +import {Platform, View, StatusBar} from "react-native"; import ThemeManager from "../utils/ThemeManager"; import Touchable from "react-native-platform-touchable"; import {ScreenOrientation} from "expo"; @@ -80,6 +80,7 @@ export default class BaseContainer extends React.Component { key: this.props.navigation.state.key, }); this.props.navigation.dispatch(setParamsAction); + StatusBar.setHidden(isLandscape); } }); } @@ -122,7 +123,7 @@ export default class BaseContainer extends React.Component { rightButton={this.props.headerRightButton} hasTabs={this.props.hasTabs} hasBackButton={this.props.hasBackButton}/> - : } + : } {this.props.children} ); diff --git a/components/WebViewScreen.js b/components/WebViewScreen.js index eb4ac9b..e68561f 100644 --- a/components/WebViewScreen.js +++ b/components/WebViewScreen.js @@ -144,7 +144,8 @@ export default class WebViewScreen extends React.Component { hasBackButton={this.props.hasHeaderBackButton} hasSideMenu={this.props.hasSideMenu} enableRotation={true} - hideHeaderOnLandscape={true}> + hideHeaderOnLandscape={true} + hasTabs={this.props.data.length > 1}> {this.props.data.length === 1 ? this.getWebview(this.props.data[0]) : { this.customInjectedJS = '$(document).ready(function() {' + OBSERVE_MUTATIONS_INJECTED + - '$("head").append(\'\');' + + '$("head").append(\'\');' + '$("head").append(\'\');'; if (ThemeManager.getNightMode())