Compare commits

..

3 commits

Author SHA1 Message Date
Arnaud Vergnet
09ed0058ae Remove useless console.log 2020-09-23 19:08:29 +02:00
Arnaud Vergnet
1639544810 Open current webview url instead of start url 2020-09-23 19:08:09 +02:00
Arnaud Vergnet
4492debad9 Fix french translation for go back/next 2020-09-23 19:03:25 +02:00
3 changed files with 8 additions and 6 deletions

View file

@ -475,8 +475,8 @@
"loading": "Chargement...",
"retry": "Réessayer",
"networkError": "Impossible de contacter les serveurs. Assure-toi d'être connecté à Internet.",
"goBack": "Suivant",
"goForward": "Précédent",
"goBack": "Précédent",
"goForward": "Suivant",
"openInBrowser": "Ouvrir dans le navigateur",
"notAvailable": "Non disponible",
"listUpdateFail": "Erreur lors de la mise à jour de la liste"

View file

@ -66,6 +66,8 @@ class WebViewScreen extends React.PureComponent<PropsType> {
customPaddingFunction: null,
};
currentUrl: string;
webviewRef: {current: null | WebView};
canGoBack: boolean;
@ -74,6 +76,7 @@ class WebViewScreen extends React.PureComponent<PropsType> {
super(props);
this.webviewRef = React.createRef();
this.canGoBack = false;
this.currentUrl = props.url;
}
/**
@ -222,8 +225,7 @@ class WebViewScreen extends React.PureComponent<PropsType> {
};
onOpenClicked = () => {
const {url} = this.props;
Linking.openURL(url);
Linking.openURL(this.currentUrl);
};
onScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => {
@ -261,7 +263,8 @@ class WebViewScreen extends React.PureComponent<PropsType> {
onRefresh={this.onRefreshClicked}
/>
)}
onNavigationStateChange={(navState: {canGoBack: boolean}) => {
onNavigationStateChange={(navState) => {
this.currentUrl = navState.url;
this.canGoBack = navState.canGoBack;
}}
onMessage={props.onMessage}

View file

@ -61,7 +61,6 @@ function EquipmentConfirmScreen(props: Props) {
date: getRelativeDateString(start),
});
}
console.log(buttonText);
return (
<CollapsibleScrollView>
<Card style={{margin: 5}}>