Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- locationPing() {
- if (this.props.accountData.check_type === "PROPERTY" || this.props.accountData.check_type === "PROJECT") {
- if(this.lastRound === 0 || (this.intervalRound * 5000) - (this.lastRound * 5000) >= this.props.accountData.ping * 1000) {
- this.lastRound = this.intervalRound;
- locationChangeHandler(this.props.accessToken, this.props.longitude, this.props.latitude)
- .then((data) => {
- switch (data.code) {
- case 'error':
- Alert.alert(
- 'Error',
- data.message
- );
- break;
- case 'success':
- this.props.onAccountData(JSON.parse(data.data));
- break;
- }
- })
- .catch((data) => {});
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement