Skip to content

Commit

Permalink
removed unnecessary toast and boolean resets
Browse files Browse the repository at this point in the history
  • Loading branch information
pmarciniak2000 committed Apr 1, 2021
1 parent ec3fa65 commit 4118ab7
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void onStopTrackingTouch(SeekBar seekBar) {
fuelPrices.put("petrol",(double) 2);
fuelPrices.put("premium petrol",(double) 4);
fuelPrices.put("diesel",(double) 3);
fuelPrices.put("premium diesel",(double) 6);
fuelPrices.put("premium diesel",(double) 5);

SharedPreferences sharedPreferences = getSharedPreferences("orderDetails", MODE_PRIVATE);
selectedUser = sharedPreferences.getInt("selectedUser", selectedUser);
Expand Down Expand Up @@ -351,7 +351,6 @@ public void run() {
popupWindow.getContentView().findViewById(R.id.liveType).setVisibility(View.INVISIBLE);
popupWindow.getContentView().findViewById(R.id.finish_button).setVisibility(View.VISIBLE);
popupWindow.getContentView().findViewById(R.id.checkbox_email).setVisibility(View.VISIBLE);
Toast.makeText(getApplicationContext(), "Fuelling Complete", Toast.LENGTH_LONG).show();
}
if (errorReceived){
// showing error message and hide other info
Expand Down Expand Up @@ -399,9 +398,6 @@ public void run() {
@Override
public void onClick(View v) {
// reset all booleans now that fuelling complete and close popup
finished = false;
forceStop = false;
errorReceived = false;
popupWindow.dismiss();
}
});
Expand Down

0 comments on commit 4118ab7

Please sign in to comment.