Skip to content

Commit 94a3917

Browse files
committed
Cleanup
1 parent e5d2e5c commit 94a3917

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app/src/main/java/com/eveningoutpost/dexdrip/utilitymodels/NightscoutUploader.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -510,22 +510,22 @@ private boolean doRESTUpload(SharedPreferences prefs, List<BgReading> glucoseDat
510510
}
511511
}
512512
if (any_successes && any_failures) { // Only if there has been success as well as failure (inconsistent upload)
513-
if (!PersistentStore.getBoolean(TAG + "inconsistentMultiSteUpload")) { // If there had been no inconsistent uploads yet, which makes this the first
514-
PersistentStore.setLong(TAG + "firstInconsistentMultiSiteUploadTime", JoH.tsl()); // Record this time as the time of the first inconsistent upload
513+
if (!PersistentStore.getBoolean(TAG + "_inconsistentMultiSteUpload")) { // If there had been no inconsistent uploads yet, which makes this the first
514+
PersistentStore.setLong(TAG + "_firstInconsistentMultiSiteUploadTime", JoH.tsl()); // Record this time as the time of the first inconsistent upload
515515
}
516-
PersistentStore.setBoolean(TAG + "inconsistentMultiSteUpload", true); // There has been inconsistent upload and we have recorded the time. Let's set the flag.
516+
PersistentStore.setBoolean(TAG + "_inconsistentMultiSteUpload", true); // There has been inconsistent upload and we have recorded the time. Let's set the flag.
517517
}
518518
return any_successes;
519519
}
520520

521521
public static void notifyInconsistentMultiSiteUpload() {
522-
long firstInconsistentMultiSiteUploadTime = PersistentStore.getLong(TAG + "firstInconsistentMultiSiteUploadTime"); // Updating the local representation of the last inconsistent upload time
523-
if (PersistentStore.getBoolean(TAG + "inconsistentMultiSteUpload")) { // If there has been a failure to upload and the queue has been cleared
522+
long firstInconsistentMultiSiteUploadTime = PersistentStore.getLong(TAG + "_firstInconsistentMultiSiteUploadTime"); // Updating the local representation of the last inconsistent upload time
523+
if (PersistentStore.getBoolean(TAG + "_inconsistentMultiSteUpload")) { // If there has been a failure to upload and the queue has been cleared
524524
if (Pref.getBooleanDefaultFalse("warn_nightscout_multi_site_upload_failure")) { // Issue notification only if enabled
525525
JoH.showNotification(xdrip.gs(R.string.title_nightscout_upload_failure_backfill_required), null, null, Constants.NIGHTSCOUT_ERROR_NOTIFICATION_ID, null, false, false, null, null, xdrip.gs(R.string.nightscout_upload_failure_backfill_required, JoH.dateTimeText(firstInconsistentMultiSiteUploadTime)), true);
526526
}
527527
UserError.Log.uel(TAG, "Inconsistent Multi-site Nightscout upload - Backfill recommended - First failure: " + JoH.dateTimeText(firstInconsistentMultiSiteUploadTime));
528-
PersistentStore.setBoolean(TAG + "inconsistentMultiSteUpload", false); // We have notified. Clearing the flag
528+
PersistentStore.setBoolean(TAG + "_inconsistentMultiSteUpload", false); // We have notified. Clearing the flag
529529
}
530530
}
531531

0 commit comments

Comments
 (0)