Skip to content

Commit

Permalink
fixed possible no data issue on chart after first load
Browse files Browse the repository at this point in the history
  • Loading branch information
hpsaturn committed Mar 29, 2021
1 parent a5ef2f7 commit 9936e8e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ private void calculateReferenceTime(){
* @param data
*/
private void addData(ArrayList<SensorData> data){
if(data==null)return;
if(data==null){
chart.setNoDataText("No data.");
loadingData = false;
return;
}
else if (!data.isEmpty()) {
Iterator<SensorData> it = data.iterator();
int count = 0;
Expand Down Expand Up @@ -305,6 +309,8 @@ public void addData(SensorData data) {
addValue(time,data);
refreshDataSets();
}
else
Logger.v(TAG,"addData skip, in loading data.");
}

private void addMapSegment(ChartVar var, SensorData data) {
Expand Down

0 comments on commit 9936e8e

Please sign in to comment.