suppression des logs dan sla webview
This commit is contained in:
parent
8f36797b00
commit
be40fb489b
File diff suppressed because one or more lines are too long
|
@ -108,10 +108,8 @@ const WebviewScreen = ({
|
|||
)
|
||||
|
||||
const checkPaymentStatus = (message) => {
|
||||
console.debug('la redirection es bonne :', message)
|
||||
message = JSON.parse(message);
|
||||
|
||||
console.warn('la redirection es bonne :', message)
|
||||
let status = message['status'];
|
||||
let transaction_id = message['transaction_id'];
|
||||
|
||||
|
|
|
@ -516,7 +516,7 @@ class Home extends BaseScreen {
|
|||
if (c.length > 0 && pays) {
|
||||
|
||||
this.setState({filternetwork: c[0], myNetwork: c[0], filternetworkTemp: c[0]})
|
||||
// this.retrieveAllPoint(pays)
|
||||
this.retrieveAllPoint(pays)
|
||||
|
||||
} else {
|
||||
if (this.state.user) {
|
||||
|
@ -1739,7 +1739,7 @@ class Home extends BaseScreen {
|
|||
translucent={true}
|
||||
/>
|
||||
{/* Start here to comment */}
|
||||
{/* {
|
||||
{
|
||||
(this.state.loadingDialog || this.props.loading) ?
|
||||
<View
|
||||
style={{
|
||||
|
@ -1760,7 +1760,7 @@ class Home extends BaseScreen {
|
|||
fontWeight: 'bold'
|
||||
}}>{I18n.t("LOADING_DOTS")}</Text>
|
||||
</View> : null
|
||||
} */}
|
||||
}
|
||||
<IMap
|
||||
ref={(re) => {
|
||||
this.map = re
|
||||
|
@ -2468,98 +2468,98 @@ class Home extends BaseScreen {
|
|||
</TouchableOpacity>)
|
||||
}
|
||||
|
||||
// retrieveAllPoint(dial_code) {
|
||||
// /* let markers= this.markerManager.getLocalMarkers()
|
||||
// console.log( markers.length)
|
||||
// if(markers.length>0){
|
||||
// console.debug("load from local")
|
||||
// for (let p of markers) {
|
||||
// console.log(` ${p.lastname}`);
|
||||
// }
|
||||
// this.markerManager.close();
|
||||
retrieveAllPoint(dial_code) {
|
||||
/* let markers= this.markerManager.getLocalMarkers()
|
||||
console.log( markers.length)
|
||||
if(markers.length>0){
|
||||
console.debug("load from local")
|
||||
for (let p of markers) {
|
||||
console.log(` ${p.lastname}`);
|
||||
}
|
||||
this.markerManager.close();
|
||||
|
||||
// this.setState({allpoint: [], loadingDialog: false})
|
||||
// }else*/
|
||||
// getMakersFrom(dial_code).then((data) => {
|
||||
// new Promise((resolve, reject) => {
|
||||
// try {
|
||||
// const ds = data.datas
|
||||
// this.setState({allpoint: ds, loadingDialog: false})
|
||||
this.setState({allpoint: [], loadingDialog: false})
|
||||
}else*/
|
||||
getMakersFrom(dial_code).then((data) => {
|
||||
new Promise((resolve, reject) => {
|
||||
try {
|
||||
const ds = data.datas
|
||||
this.setState({allpoint: ds, loadingDialog: false})
|
||||
|
||||
// resolve(ds)
|
||||
// } catch (e) {
|
||||
// //Crashlytics.log(e.message)
|
||||
// console.warn(e.message)
|
||||
// reject(new Error(e.message))
|
||||
// }
|
||||
// }).then((ds) => {
|
||||
// // this.markerManager.insertMarkers(ds).then((res)=>{console.warn(res)})
|
||||
// this.onLoadMore()
|
||||
// }).catch((e) => {
|
||||
// this.setState({loadingDialog: false})
|
||||
// //Crashlytics.log(e.message)
|
||||
// console.log("on get marker")
|
||||
resolve(ds)
|
||||
} catch (e) {
|
||||
//Crashlytics.log(e.message)
|
||||
console.warn(e.message)
|
||||
reject(new Error(e.message))
|
||||
}
|
||||
}).then((ds) => {
|
||||
// this.markerManager.insertMarkers(ds).then((res)=>{console.warn(res)})
|
||||
this.onLoadMore()
|
||||
}).catch((e) => {
|
||||
this.setState({loadingDialog: false})
|
||||
//Crashlytics.log(e.message)
|
||||
console.log("on get marker")
|
||||
|
||||
// Alert.alert(
|
||||
// I18n.t("UNABLE_TO_CONNECT_TITLE"),
|
||||
// I18n.t('TEXT_NETWORK_UNABLE')
|
||||
// ,
|
||||
// [
|
||||
// {
|
||||
// text: I18n.t("NO"), onPress: () => {
|
||||
// BackHandler.exitApp()
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// text: I18n.t("YES"), onPress: () => {
|
||||
// this.setState({loadingDialog: true})
|
||||
// if (dial_code !== null && dial_code !== undefined)
|
||||
// this.retrieveAllPoint(dial_code)
|
||||
// else
|
||||
// this.requestCameraPermission()
|
||||
// }
|
||||
// }
|
||||
Alert.alert(
|
||||
I18n.t("UNABLE_TO_CONNECT_TITLE"),
|
||||
I18n.t('TEXT_NETWORK_UNABLE')
|
||||
,
|
||||
[
|
||||
{
|
||||
text: I18n.t("NO"), onPress: () => {
|
||||
BackHandler.exitApp()
|
||||
}
|
||||
},
|
||||
{
|
||||
text: I18n.t("YES"), onPress: () => {
|
||||
this.setState({loadingDialog: true})
|
||||
if (dial_code !== null && dial_code !== undefined)
|
||||
this.retrieveAllPoint(dial_code)
|
||||
else
|
||||
this.requestCameraPermission()
|
||||
}
|
||||
}
|
||||
|
||||
// ],
|
||||
// {cancelable: false}
|
||||
// )
|
||||
// })
|
||||
],
|
||||
{cancelable: false}
|
||||
)
|
||||
})
|
||||
|
||||
// }).catch((e) => {
|
||||
// console.log("on retreive>getmarkers", e.message)
|
||||
}).catch((e) => {
|
||||
console.log("on retreive>getmarkers", e.message)
|
||||
|
||||
// this.setState({loadingDialog: false})
|
||||
// if (this.state.allpoint.length <= 0) {
|
||||
// console.log("no point")
|
||||
// Alert.alert(
|
||||
// I18n.t("UNABLE_TO_CONNECT_TITLE"),
|
||||
// I18n.t('TEXT_NETWORK_UNABLE')
|
||||
// ,
|
||||
// [
|
||||
// {
|
||||
// text: I18n.t("NO"), onPress: () => {
|
||||
// BackHandler.exitApp()
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// text: I18n.t("YES"), onPress: () => {
|
||||
// if (this.state.allpoint.length <= 0) {
|
||||
// this.setState({loadingDialog: true})
|
||||
// if (dial_code !== null && dial_code !== undefined)
|
||||
// this.retrieveAllPoint(dial_code)
|
||||
// else
|
||||
// this.requestCameraPermission()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
this.setState({loadingDialog: false})
|
||||
if (this.state.allpoint.length <= 0) {
|
||||
console.log("no point")
|
||||
Alert.alert(
|
||||
I18n.t("UNABLE_TO_CONNECT_TITLE"),
|
||||
I18n.t('TEXT_NETWORK_UNABLE')
|
||||
,
|
||||
[
|
||||
{
|
||||
text: I18n.t("NO"), onPress: () => {
|
||||
BackHandler.exitApp()
|
||||
}
|
||||
},
|
||||
{
|
||||
text: I18n.t("YES"), onPress: () => {
|
||||
if (this.state.allpoint.length <= 0) {
|
||||
this.setState({loadingDialog: true})
|
||||
if (dial_code !== null && dial_code !== undefined)
|
||||
this.retrieveAllPoint(dial_code)
|
||||
else
|
||||
this.requestCameraPermission()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ],
|
||||
// {cancelable: false}
|
||||
// )
|
||||
// }
|
||||
// })
|
||||
],
|
||||
{cancelable: false}
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
showLoadMoreView() {
|
||||
if (this.state.isNeedLoadMore)
|
||||
|
|
|
@ -58,19 +58,19 @@ class PaymentCard extends Component {
|
|||
this.deltaY = new Animated.Value(0);
|
||||
this.bgBannerY = new Animated.Value(0);
|
||||
IlinkEmitter.on("refreshWallet",
|
||||
// this.refresh
|
||||
this.refresh
|
||||
);
|
||||
|
||||
}
|
||||
// refresh = () => {
|
||||
// readUser().then((user) => {
|
||||
// if (user) {
|
||||
// if (user !== undefined) {
|
||||
// this.props.getWalletDetailActivated(user.id, null);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
refresh = () => {
|
||||
readUser().then((user) => {
|
||||
if (user) {
|
||||
if (user !== undefined) {
|
||||
this.props.getWalletDetailActivated(user.id, null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue