Fixed banner content offset

This commit is contained in:
Arnaud Vergnet 2020-04-28 10:57:36 +02:00
parent e1014a173e
commit 50a5f087b6
2 changed files with 27 additions and 18 deletions

View file

@ -302,10 +302,18 @@ class PlanexScreen extends React.Component<Props, State> {
<View <View
style={{flex: 1}} style={{flex: 1}}
> >
{/*Allow to draw webview bellow banner*/}
<View style={{
position: 'absolute',
height: '100%',
width: '100%',
}}>
{this.props.theme.dark // Force component theme update
? this.getWebView()
: <View style={{height: '100%'}}>{this.getWebView()}</View>}
</View>
<Banner <Banner
style={{ style={{marginTop: containerPaddingTop,}}
marginTop: this.state.bannerVisible ? containerPaddingTop : 0,
}}
visible={this.state.bannerVisible} visible={this.state.bannerVisible}
actions={[ actions={[
{ {
@ -330,9 +338,6 @@ class PlanexScreen extends React.Component<Props, State> {
onDismiss={this.hideDialog} onDismiss={this.hideDialog}
title={this.state.dialogTitle} title={this.state.dialogTitle}
message={this.state.dialogMessage}/> message={this.state.dialogMessage}/>
{this.props.theme.dark // Force component theme update
? this.getWebView()
: <View style={{height: '100%'}}>{this.getWebView()}</View>}
<AnimatedBottomBar <AnimatedBottomBar
{...this.props} {...this.props}
ref={this.barRef} ref={this.barRef}

View file

@ -424,10 +424,23 @@ class ProxiwashScreen extends React.Component<Props, State> {
<View <View
style={{flex: 1}} style={{flex: 1}}
> >
<View style={{
position: "absolute",
width: "100%",
height: "100%",
}}>
<WebSectionList
createDataset={this.createDataset}
navigation={nav}
fetchUrl={DATA_URL}
renderItem={this.getRenderItem}
renderSectionHeader={this.getRenderSectionHeader}
autoRefreshTime={REFRESH_TIME}
refreshOnFocus={true}
updateData={this.state.machinesWatched.length}/>
</View>
<Banner <Banner
style={{ style={{marginTop: containerPaddingTop,}}
marginTop: this.state.bannerVisible ? containerPaddingTop : 0,
}}
visible={this.state.bannerVisible} visible={this.state.bannerVisible}
actions={[ actions={[
{ {
@ -445,15 +458,6 @@ class ProxiwashScreen extends React.Component<Props, State> {
<CustomModal onRef={this.onModalRef}> <CustomModal onRef={this.onModalRef}>
{this.state.modalCurrentDisplayItem} {this.state.modalCurrentDisplayItem}
</CustomModal> </CustomModal>
<WebSectionList
createDataset={this.createDataset}
navigation={nav}
fetchUrl={DATA_URL}
renderItem={this.getRenderItem}
renderSectionHeader={this.getRenderSectionHeader}
autoRefreshTime={REFRESH_TIME}
refreshOnFocus={true}
updateData={this.state.machinesWatched.length}/>
</View> </View>
); );
} }