Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jamorham committed Jan 16, 2024
2 parents 217a610 + 6e2f6fd commit 2db9aa6
Show file tree
Hide file tree
Showing 2 changed files with 11 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
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1549,6 +1549,8 @@
<string name="change_settings">Change settings</string>
<string name="do_you_want_to_delete_and_reset_the_calibrations_for_this_sensor">Do you want to delete and reset the calibrations for this sensor?</string>
<string name="sensor_stop_confirm">Do you want to stop the sensor?</string>
<string name="sensor_stop_confirm_norestart">You will not be able to simply restart the sensor.</string>
<string name="sensor_stop_confirm_really_norestart">WARNING!\n\nYou will not be able to restart the device.</string>
<string name="you_have_an_old_experimental_glucose_prediction_setting_enabled__this_is_not_recommended_and_could_mess_things_up_badly__shall_i_disable_this_for_you">You have an old experimental glucose prediction setting enabled.\n\nThis is NOT RECOMMENDED and could mess things up badly.\n\nShall I disable this for you?</string>
<string name="settings_issue">Settings Issue!</string>
<string name="do_you_want_to_use_this_synced_fingerstick_blood_glucose_result_to_calibrate_with__you_can_change_when_this_dialog_is_displayed_in_settings">Do you want to use this synced finger-stick blood glucose result to calibrate with?\n\n(you can change when this dialog is displayed in Settings)</string>
Expand Down

0 comments on commit 2db9aa6

Please sign in to comment.