Merge remote-tracking branch 'origin/dev' into dagger3
This commit is contained in:
commit
2995999989
4 changed files with 26 additions and 13 deletions
|
@ -56,7 +56,7 @@ class VersionCheckerUtils @Inject constructor(
|
||||||
}
|
}
|
||||||
}.start()
|
}.start()
|
||||||
} else
|
} else
|
||||||
aapsLogger.debug(LTag.CORE, "Github master version no checked. No connectivity")
|
aapsLogger.debug(LTag.CORE, "Github master version not checked. No connectivity")
|
||||||
|
|
||||||
@Suppress("SameParameterValue")
|
@Suppress("SameParameterValue")
|
||||||
fun compareWithCurrentVersion(newVersion: String?, currentVersion: String) {
|
fun compareWithCurrentVersion(newVersion: String?, currentVersion: String) {
|
||||||
|
|
|
@ -719,20 +719,28 @@ class SmsCommunicatorPlugin @Inject constructor(
|
||||||
override fun run() {
|
override fun run() {
|
||||||
val detailedBolusInfo = DetailedBolusInfo()
|
val detailedBolusInfo = DetailedBolusInfo()
|
||||||
detailedBolusInfo.carbs = anInteger().toDouble()
|
detailedBolusInfo.carbs = anInteger().toDouble()
|
||||||
|
detailedBolusInfo.source = Source.USER
|
||||||
detailedBolusInfo.date = secondLong()
|
detailedBolusInfo.date = secondLong()
|
||||||
commandQueue.bolus(detailedBolusInfo, object : Callback() {
|
if (activePlugin.activePump.pumpDescription.storesCarbInfo) {
|
||||||
override fun run() {
|
commandQueue.bolus(detailedBolusInfo, object : Callback() {
|
||||||
if (result.success) {
|
override fun run() {
|
||||||
var replyText = String.format(resourceHelper.gs(R.string.smscommunicator_carbsset), anInteger)
|
if (result.success) {
|
||||||
replyText += "\n" + activePlugin.activePump.shortStatus(true)
|
var replyText = String.format(resourceHelper.gs(R.string.smscommunicator_carbsset), anInteger)
|
||||||
sendSMSToAllNumbers(Sms(receivedSms.phoneNumber, replyText))
|
replyText += "\n" + activePlugin.activePump.shortStatus(true)
|
||||||
} else {
|
sendSMSToAllNumbers(Sms(receivedSms.phoneNumber, replyText))
|
||||||
var replyText = resourceHelper.gs(R.string.smscommunicator_carbsfailed)
|
} else {
|
||||||
replyText += "\n" + activePlugin.activePump.shortStatus(true)
|
var replyText = resourceHelper.gs(R.string.smscommunicator_carbsfailed)
|
||||||
sendSMS(Sms(receivedSms.phoneNumber, replyText))
|
replyText += "\n" + activePlugin.activePump.shortStatus(true)
|
||||||
|
sendSMS(Sms(receivedSms.phoneNumber, replyText))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
} else {
|
||||||
|
activePlugin.activeTreatments.addToHistoryTreatment(detailedBolusInfo, true)
|
||||||
|
var replyText = String.format(resourceHelper.gs(R.string.smscommunicator_carbsset), anInteger)
|
||||||
|
replyText += "\n" + activePlugin.activePump.shortStatus(true)
|
||||||
|
sendSMSToAllNumbers(Sms(receivedSms.phoneNumber, replyText))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -281,6 +281,10 @@ public class TreatmentService extends OrmLiteBaseService<DatabaseHelper> {
|
||||||
|
|
||||||
// return true if new record is created
|
// return true if new record is created
|
||||||
public UpdateReturn createOrUpdate(Treatment treatment) {
|
public UpdateReturn createOrUpdate(Treatment treatment) {
|
||||||
|
if (treatment != null && treatment.source == Source.NONE) {
|
||||||
|
log.error("Coder error: source is not set for treatment: " + treatment, new Exception());
|
||||||
|
//FabricPrivacy.logException(new Exception("Coder error: source is not set for treatment: " + treatment));
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
Treatment old;
|
Treatment old;
|
||||||
treatment.date = DatabaseHelper.roundDateToSec(treatment.date);
|
treatment.date = DatabaseHelper.roundDateToSec(treatment.date);
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
<string name="objectives_useloop">Inhoud van loop plugin weergeven</string>
|
<string name="objectives_useloop">Inhoud van loop plugin weergeven</string>
|
||||||
<string name="objectives_usescale">Gebruik de schaalfunctie: houd de BG grafiek lang ingedrukt</string>
|
<string name="objectives_usescale">Gebruik de schaalfunctie: houd de BG grafiek lang ingedrukt</string>
|
||||||
<string name="objectives_button_enter">Enter</string>
|
<string name="objectives_button_enter">Enter</string>
|
||||||
|
<string name="enter_code_obtained_from_developers_to_bypass_the_rest_of_objectives">Als je ten minste 3 maanden closed loop ervaring hebt met een ander doe-het-zelf systeem dan kun je wellicht een code aanvragen om doelen over te slaan. Zie https://androidaps.readthedocs.io/en/latest/CROWDIN/nl/Usage/Objectives.html#doelen-overslaan voor details.</string>
|
||||||
<string name="codeaccepted">Code geaccepteerd</string>
|
<string name="codeaccepted">Code geaccepteerd</string>
|
||||||
<string name="codeinvalid">Code ongeldig</string>
|
<string name="codeinvalid">Code ongeldig</string>
|
||||||
<string name="objectives_exam_objective">Bewijs je kennis</string>
|
<string name="objectives_exam_objective">Bewijs je kennis</string>
|
||||||
|
|
Loading…
Reference in a new issue