Fixed proxiwash screen not updating and removed more console.log
This commit is contained in:
parent
df407086a4
commit
2598be6e49
4 changed files with 6 additions and 41 deletions
|
@ -63,13 +63,6 @@ export default class FetchedDataSectionList extends React.Component<Props, State
|
|||
this.renderItemNotEmpty = this.renderItem.bind(this, false);
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps: Props, nextState: State): boolean {
|
||||
return this.state.refreshing !== nextState.refreshing ||
|
||||
nextState.firstLoading !== this.state.firstLoading ||
|
||||
nextState.machinesWatched.length !== this.state.machinesWatched.length ||
|
||||
nextState.fetchedData.len !== this.state.fetchedData.len;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the translation for the header in the current language
|
||||
|
|
|
@ -232,7 +232,7 @@ export default class PlanningScreen extends React.Component<Props, State> {
|
|||
this.setState({
|
||||
refreshing: false,
|
||||
});
|
||||
console.log(err);
|
||||
// console.log(err);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -123,18 +123,8 @@ export default class NotificationsManager {
|
|||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: JSON.stringify(data) // <-- Post parameters
|
||||
})
|
||||
.then((response) => response.json())
|
||||
.then((responseJson) => {
|
||||
callback(responseJson);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
} else {
|
||||
console.log('Expo token not available');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -161,16 +151,7 @@ export default class NotificationsManager {
|
|||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: JSON.stringify(data) // <-- Post parameters
|
||||
})
|
||||
.then((response) => response.text())
|
||||
.then((responseText) => {
|
||||
console.log(responseText);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
} else {
|
||||
console.log('Expo token not available');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,16 +175,7 @@ export default class NotificationsManager {
|
|||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: JSON.stringify(data) // <-- Post parameters
|
||||
})
|
||||
.then((response) => response.text())
|
||||
.then((responseText) => {
|
||||
console.log(responseText);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
} else {
|
||||
console.log('Expo token not available');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ export default class WebDataManager {
|
|||
let response = await fetch(this.FETCH_URL);
|
||||
fetchedData = await response.json();
|
||||
} catch (error) {
|
||||
console.log('Could not read FetchedData from server');
|
||||
console.log(error);
|
||||
// console.log('Could not read FetchedData from server');
|
||||
// console.log(error);
|
||||
throw new Error('Could not read FetchedData from server');
|
||||
}
|
||||
this.lastDataFetched = fetchedData;
|
||||
|
|
Loading…
Reference in a new issue