Skip to content

Commit

Permalink
Merge pull request #3 from winemug/omnipod_dev
Browse files Browse the repository at this point in the history
merge for v1.4.3
  • Loading branch information
winemug authored May 12, 2019
2 parents 34f6f9c + c79ed16 commit 53a2bf6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ android {
targetSdkVersion 25
multiDexEnabled true
versionCode 1500
version "2.3.omnipy1.4.1"
version "2.3.omnipy1.4.3"
buildConfigField "String", "VERSION", '"' + version + '"'
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ public void ArchivePod(View view)

public void ActivatePod(View view)
{
Profile profile = ProfileFunctions.getInstance().getProfile();
if (profile == null)
{
DialogMessageWithOK(MainApp.gs(R.string.omnipod_activate_err_no_profile_set));
return;
}
OmnipyRestApi rest = _pdm.GetRestApi();
Confirm(MainApp.gs(R.string.omnipod_ActivatePod_1) + "\n" + "\n" + //"Please fill the pod with insulin before starting with activation process."
MainApp.gs(R.string.omnipod_ActivatePod_2), //"Have you filled the pod with insulin and heard two beeps while filling it?"
Expand All @@ -206,7 +212,6 @@ public void ActivatePod(View view)
MainApp.gs(R.string.omnipod_ActivatePod_6) + //"If this takes longer than 30 seconds, try changing positions of the pod and RL"
MainApp.gs(R.string.omnipod_ActivatePod_7)); //" ensuring there is a small gap between the two of them.\nOmnipy will try to pair with the pod for up to 2 minutes."

Profile profile = ProfileFunctions.getInstance().getProfile();
TimeZone tz = profile.getTimeZone();
int offset_minutes = (tz.getRawOffset() + tz.getDSTSavings()) / (60 * 1000);

Expand Down Expand Up @@ -360,15 +365,15 @@ public void onClick(View view) {
private void DialogMessage(String text)
{
CloseDialog();
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
AlertDialog.Builder builder = new AlertDialog.Builder(getContext()).setCancelable(false);
builder.setMessage(text);
_currentDialog = builder.show();
}

private void DialogMessageWithOK(String text)
{
CloseDialog();
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
AlertDialog.Builder builder = new AlertDialog.Builder(getContext()).setCancelable(false);
_currentDialog = builder.setMessage(text).setPositiveButton("OK", null).show();
}

Expand All @@ -383,7 +388,7 @@ private void CloseDialog()

private void Confirm(String text, Runnable ifYes) {
CloseDialog();
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
AlertDialog.Builder builder = new AlertDialog.Builder(getContext()).setCancelable(false);
DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1329,4 +1329,5 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="pod_age_format">%dj %dh %dm</string>
<string name="Searching_for_omnipy_on_local_network">Recherche d\'Omnipy sur le réseau local..</string>
<string name="Trying_to_connect_to_omnipy_at_address">Tentative de connexion à l\'adresse:</string>
<string name="omnipod_activate_err_no_profile_set">Erreur: Un POD ne peut être activé sans profil d'utilisateur actif. Merci d'activer un profil dans AndroidAPS.</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1552,6 +1552,7 @@
<string name="pod_age_format">%dd%dh%dm</string>
<string name="Searching_for_omnipy_on_local_network">Searching for omnipy on local network..</string>
<string name="Trying_to_connect_to_omnipy_at_address">Trying to connect to omnipy at address:</string>
<string name="omnipod_activate_err_no_profile_set">Error: Cannot activate a pod without an active user profile. Please set it up using AndroidAPS profile actions.</string>


<plurals name="objective_days">
Expand Down

0 comments on commit 53a2bf6

Please # to comment.