Skip to content

Commit

Permalink
Stop sensor confirmation detail
Browse files Browse the repository at this point in the history
  • Loading branch information
Navid200 committed Jan 3, 2024
1 parent bb1a115 commit 7dfda55
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/src/main/java/com/eveningoutpost/dexdrip/StopSensor.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import lombok.val;

import static com.eveningoutpost.dexdrip.g5model.Ob1G5StateMachine.shortTxId;
import static com.eveningoutpost.dexdrip.services.Ob1G5CollectionService.getTransmitterID;
import static com.eveningoutpost.dexdrip.xdrip.gs;

Expand Down Expand Up @@ -105,7 +106,14 @@ public boolean resettableCals() { // Used on the stop sensor menu.
}

public void stopSensorClick() {
GenericConfirmDialog.show(StopSensor.this, gs(R.string.are_you_sure), gs(R.string.sensor_stop_confirm), () -> {
String confirm = gs(R.string.are_you_sure);
if (!resettableCals()) { // Dexcom G6 Firefly or G7
confirm = gs(R.string.sensor_stop_confirm_norestart);
if (shortTxId()) { // Dexcom G7
confirm = gs(R.string.sensor_stop_confirm_really_norestart);
}
}
GenericConfirmDialog.show(StopSensor.this, gs(R.string.are_you_sure), confirm, () -> {
stop();
JoH.startActivity(Home.class);
finish();
Expand Down

0 comments on commit 7dfda55

Please sign in to comment.