Skip to content

Commit

Permalink
Fixes fossasia#2000 Fixed the repeated display of 'Not Connected' Toa…
Browse files Browse the repository at this point in the history
…st message in DustSensor
  • Loading branch information
abhishekbisht1429 committed Nov 12, 2019
1 parent 6f9c2ed commit a1f8f59
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
scienceLab = ScienceLabCommon.scienceLab;
entries = new ArrayList<>();
setupInstruments();
if(!scienceLab.isConnected())
Toast.makeText(getContext(), R.string.not_connected, Toast.LENGTH_SHORT).show();
return rootView;
}

Expand Down Expand Up @@ -388,8 +390,6 @@ private void visualizeData() {
mChart.moveViewToX(data.getEntryCount());
mChart.invalidate();
}
} else {
Toast.makeText(getContext(), R.string.not_connected, Toast.LENGTH_SHORT).show();
}
}

Expand Down

0 comments on commit a1f8f59

Please sign in to comment.