resourceHelper -> rh
This commit is contained in:
parent
b592054c18
commit
d06ae6b0bc
6 changed files with 8 additions and 8 deletions
|
@ -30,7 +30,7 @@ class CommandBolus(
|
|||
}
|
||||
|
||||
override fun status(): String {
|
||||
return (if (detailedBolusInfo.insulin > 0) "BOLUS " + resourceHelper.gs(R.string.formatinsulinunits, detailedBolusInfo.insulin) else "") +
|
||||
if (detailedBolusInfo.carbs > 0) "CARBS " + resourceHelper.gs(R.string.format_carbs, detailedBolusInfo.carbs.toInt()) else ""
|
||||
return (if (detailedBolusInfo.insulin > 0) "BOLUS " + rh.gs(R.string.formatinsulinunits, detailedBolusInfo.insulin) else "") +
|
||||
if (detailedBolusInfo.carbs > 0) "CARBS " + rh.gs(R.string.format_carbs, detailedBolusInfo.carbs.toInt()) else ""
|
||||
}
|
||||
}
|
|
@ -37,5 +37,5 @@ class CommandSMBBolus(
|
|||
callback?.result(r)?.run()
|
||||
}
|
||||
|
||||
override fun status(): String = "SMB BOLUS ${resourceHelper.gs(R.string.formatinsulinunits, detailedBolusInfo.insulin)}"
|
||||
override fun status(): String = "SMB BOLUS ${rh.gs(R.string.formatinsulinunits, detailedBolusInfo.insulin)}"
|
||||
}
|
|
@ -41,7 +41,7 @@ class CommandSetProfile constructor(
|
|||
val profileSwitch = repository.getEffectiveProfileSwitchActiveAt(dateUtil.now()).blockingGet()
|
||||
if (profileSwitch is ValueWrapper.Existing && r.enacted && hasNsId && !config.NSCLIENT) {
|
||||
if (smsCommunicatorPlugin.isEnabled(PluginType.GENERAL))
|
||||
smsCommunicatorPlugin.sendNotificationToAllNumbers(resourceHelper.gs(R.string.profile_set_ok))
|
||||
smsCommunicatorPlugin.sendNotificationToAllNumbers(rh.gs(R.string.profile_set_ok))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ class CommandQueueTest : TestBaseWithProfile() {
|
|||
AndroidInjector {
|
||||
if (it is Command) {
|
||||
it.aapsLogger = aapsLogger
|
||||
it.resourceHelper = resourceHelper
|
||||
it.rh = resourceHelper
|
||||
}
|
||||
if (it is CommandTempBasalPercent) {
|
||||
it.activePlugin = activePlugin
|
||||
|
|
|
@ -37,7 +37,7 @@ class QueueThreadTest : TestBaseWithProfile() {
|
|||
AndroidInjector {
|
||||
if (it is Command) {
|
||||
it.aapsLogger = aapsLogger
|
||||
it.resourceHelper = resourceHelper
|
||||
it.rh = resourceHelper
|
||||
}
|
||||
if (it is CommandTempBasalAbsolute) {
|
||||
it.activePlugin = activePlugin
|
||||
|
|
|
@ -17,7 +17,7 @@ abstract class Command(
|
|||
) {
|
||||
|
||||
@Inject lateinit var aapsLogger: AAPSLogger
|
||||
@Inject lateinit var resourceHelper: ResourceHelper
|
||||
@Inject lateinit var rh: ResourceHelper
|
||||
@Inject lateinit var repository: AppRepository
|
||||
|
||||
enum class CommandType {
|
||||
|
@ -49,7 +49,7 @@ abstract class Command(
|
|||
fun cancel() {
|
||||
val result = PumpEnactResult(injector)
|
||||
result.success = false
|
||||
result.comment = resourceHelper.gs(R.string.connectiontimedout)
|
||||
result.comment = rh.gs(R.string.connectiontimedout)
|
||||
aapsLogger.debug(LTag.PUMPQUEUE, "Result cancel")
|
||||
callback?.result(result)?.run()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue