merge :core:graph to :core:main to speedup build

This commit is contained in:
Milos Kozak 2023-09-14 23:12:46 +02:00
parent 471ed28a04
commit c6f0da396f
83 changed files with 33 additions and 88 deletions

View file

@ -1,3 +0,0 @@
package info.nightscout.rx.events
class EventFoodChanged : Event()

View file

@ -0,0 +1,3 @@
package info.nightscout.rx.events
class EventFoodDatabaseChanged : Event()

View file

@ -184,7 +184,6 @@ dependencies {
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':app-wear-shared:shared-impl') implementation project(':app-wear-shared:shared-impl')
implementation project(':core:main') implementation project(':core:main')
implementation project(':core:graph')
implementation project(':core:graphview') implementation project(':core:graphview')
implementation project(':core:interfaces') implementation project(':core:interfaces')
implementation project(':core:libraries') implementation project(':core:libraries')

View file

@ -1 +0,0 @@
/build

View file

@ -1,27 +0,0 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-parcelize'
id 'kotlin-allopen'
}
apply from: "${project.rootDir}/core/main/android_dependencies.gradle"
apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle"
apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle"
apply from: "${project.rootDir}/core/main/test_dependencies.gradle"
apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
dependencies {
implementation project(':core:graphview')
implementation project(':app-wear-shared:shared')
implementation project(':database:entities')
implementation project(':core:interfaces')
implementation project(':core:ui')
api "com.google.android.material:material:$material_version"
}
android {
namespace 'info.nightscout.core.graph'
}

View file

@ -1,21 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest>
</manifest>

View file

@ -15,7 +15,7 @@ apply from: "${project.rootDir}/core/main/jacoco_global.gradle"
dependencies { dependencies {
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':database:entities') implementation project(':database:entities')
implementation project(':core:graph') implementation project(':core:graphview')
implementation project(':core:interfaces') implementation project(':core:interfaces')
implementation project(':core:ui') implementation project(':core:ui')
implementation project(':core:utils') implementation project(':core:utils')
@ -28,6 +28,7 @@ dependencies {
api "androidx.activity:activity-ktx:$activity_version" api "androidx.activity:activity-ktx:$activity_version"
api "androidx.appcompat:appcompat:$appcompat_version" api "androidx.appcompat:appcompat:$appcompat_version"
api "com.google.android.material:material:$material_version"
api "com.google.dagger:dagger-android:$dagger_version" api "com.google.dagger:dagger-android:$dagger_version"
api "com.google.dagger:dagger-android-support:$dagger_version" api "com.google.dagger:dagger-android-support:$dagger_version"

View file

@ -2,7 +2,7 @@ package info.nightscout.core.graph.data
import android.content.Context import android.content.Context
import android.graphics.Paint import android.graphics.Paint
import info.nightscout.core.graph.R import info.nightscout.core.main.R
import info.nightscout.database.entities.Carbs import info.nightscout.database.entities.Carbs
import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.interfaces.ResourceHelper

View file

@ -17,7 +17,7 @@ import com.jjoe64.graphview.series.BaseSeries;
import java.util.Iterator; import java.util.Iterator;
import info.nightscout.core.graph.R; import info.nightscout.core.main.R;
/** /**
* Series that plots the data as points. * Series that plots the data as points.

View file

@ -37,8 +37,8 @@ files:
translation: /plugins/sync/src/main/res/values-%android_code%/oh_strings.xml translation: /plugins/sync/src/main/res/values-%android_code%/oh_strings.xml
- source: /plugins/constraints/src/main/res/values/strings.xml - source: /plugins/constraints/src/main/res/values/strings.xml
translation: /plugins/constraints/src/main/res/values-%android_code%/strings.xml translation: /plugins/constraints/src/main/res/values-%android_code%/strings.xml
- source: /core/graph/src/main/res/values/strings.xml - source: /core/main/src/main/res/values/strings.xml
translation: /core/graph/src/main/res/values-%android_code%/strings.xml translation: /core/main/src/main/res/values-%android_code%/strings.xml
- source: /core/interfaces/src/main/res/values/strings.xml - source: /core/interfaces/src/main/res/values/strings.xml
translation: /core/interfaces/src/main/res/values-%android_code%/strings.xml translation: /core/interfaces/src/main/res/values-%android_code%/strings.xml
- source: /core/utils/src/main/res/values/strings.xml - source: /core/utils/src/main/res/values/strings.xml

View file

@ -19,7 +19,6 @@ dependencies {
implementation project(':database:entities') implementation project(':database:entities')
implementation project(':database:impl') implementation project(':database:impl')
implementation project(':core:main') implementation project(':core:main')
implementation project(':core:graph')
implementation project(':core:graphview') implementation project(':core:graphview')
implementation project(':core:interfaces') implementation project(':core:interfaces')
implementation project(':core:ui') implementation project(':core:ui')

View file

@ -19,7 +19,7 @@ import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.events.EventDeviceStatusChange import info.nightscout.rx.events.EventDeviceStatusChange
import info.nightscout.rx.events.EventEffectiveProfileSwitchChanged import info.nightscout.rx.events.EventEffectiveProfileSwitchChanged
import info.nightscout.rx.events.EventExtendedBolusChange import info.nightscout.rx.events.EventExtendedBolusChange
import info.nightscout.rx.events.EventFoodChanged import info.nightscout.rx.events.EventFoodDatabaseChanged
import info.nightscout.rx.events.EventNewBG import info.nightscout.rx.events.EventNewBG
import info.nightscout.rx.events.EventNewHistoryData import info.nightscout.rx.events.EventNewHistoryData
import info.nightscout.rx.events.EventOfflineChange import info.nightscout.rx.events.EventOfflineChange
@ -101,7 +101,7 @@ class CompatDBHelper @Inject constructor(
} }
it.filterIsInstance<Food>().firstOrNull()?.let { food -> it.filterIsInstance<Food>().firstOrNull()?.let { food ->
aapsLogger.debug(LTag.DATABASE, "Firing EventFoodDatabaseChanged $food") aapsLogger.debug(LTag.DATABASE, "Firing EventFoodDatabaseChanged $food")
rxBus.send(EventFoodChanged()) rxBus.send(EventFoodDatabaseChanged())
} }
it.filterIsInstance<ProfileSwitch>().firstOrNull()?.let { ps -> it.filterIsInstance<ProfileSwitch>().firstOrNull()?.let { ps ->
aapsLogger.debug(LTag.DATABASE, "Firing EventProfileSwitchChanged $ps") aapsLogger.debug(LTag.DATABASE, "Firing EventProfileSwitchChanged $ps")

View file

@ -39,7 +39,7 @@ class CommandBolus(
override fun log(): String { override fun log(): String {
return (if (detailedBolusInfo.insulin > 0) "BOLUS " + rh.gs(info.nightscout.interfaces.R.string.format_insulin_units, detailedBolusInfo.insulin) else "") + return (if (detailedBolusInfo.insulin > 0) "BOLUS " + rh.gs(info.nightscout.interfaces.R.string.format_insulin_units, detailedBolusInfo.insulin) else "") +
if (detailedBolusInfo.carbs > 0) "CARBS " + rh.gs(info.nightscout.core.graph.R.string.format_carbs, detailedBolusInfo.carbs.toInt()) else "" if (detailedBolusInfo.carbs > 0) "CARBS " + rh.gs(info.nightscout.core.main.R.string.format_carbs, detailedBolusInfo.carbs.toInt()) else ""
} }
override fun cancel() { override fun cancel() {

View file

@ -42,7 +42,8 @@ fun TotalDailyDose.toTableRow(context: Context, rh: ResourceHelper, dateUtil: Da
row.addView(TextView(context).apply { gravity = Gravity.CENTER_HORIZONTAL; layoutParams = lp.apply { column = 3 }; text = rh.gs(info.nightscout.interfaces.R.string.format_insulin_units1, basalAmount) }) row.addView(TextView(context).apply { gravity = Gravity.CENTER_HORIZONTAL; layoutParams = lp.apply { column = 3 }; text = rh.gs(info.nightscout.interfaces.R.string.format_insulin_units1, basalAmount) })
row.addView(TextView(context).apply { gravity = Gravity.CENTER_HORIZONTAL; layoutParams = lp.apply { column = 4 }; text = rh.gs(info.nightscout.core.ui.R.string.formatPercent, basalPct) }) row.addView(TextView(context).apply { gravity = Gravity.CENTER_HORIZONTAL; layoutParams = lp.apply { column = 4 }; text = rh.gs(info.nightscout.core.ui.R.string.formatPercent, basalPct) })
if (includeCarbs) if (includeCarbs)
row.addView(TextView(context).apply { gravity = Gravity.CENTER_HORIZONTAL; layoutParams = lp.apply { column = 5 }; text = rh.gs(info.nightscout.core.graph.R.string.format_carbs, carbs.toInt()) }) row.addView(TextView(context).apply { gravity = Gravity.CENTER_HORIZONTAL; layoutParams = lp.apply { column = 5 }; text = rh.gs(info.nightscout.core.main.R.string.format_carbs, carbs
.toInt()) })
} }
} }
@ -59,6 +60,7 @@ fun TotalDailyDose.toTableRow(context: Context, rh: ResourceHelper, days: Int, i
row.addView(TextView(context).apply { gravity = Gravity.CENTER_HORIZONTAL; layoutParams = lp.apply { column = 3 }; text = rh.gs(info.nightscout.interfaces.R.string.format_insulin_units1, basalAmount) }) row.addView(TextView(context).apply { gravity = Gravity.CENTER_HORIZONTAL; layoutParams = lp.apply { column = 3 }; text = rh.gs(info.nightscout.interfaces.R.string.format_insulin_units1, basalAmount) })
row.addView(TextView(context).apply { gravity = Gravity.CENTER_HORIZONTAL; layoutParams = lp.apply { column = 4 }; text = rh.gs(info.nightscout.core.ui.R.string.formatPercent, basalPct) }) row.addView(TextView(context).apply { gravity = Gravity.CENTER_HORIZONTAL; layoutParams = lp.apply { column = 4 }; text = rh.gs(info.nightscout.core.ui.R.string.formatPercent, basalPct) })
if (includeCarbs) if (includeCarbs)
row.addView(TextView(context).apply { gravity = Gravity.CENTER_HORIZONTAL; layoutParams = lp.apply { column = 5 }; text = rh.gs(info.nightscout.core.graph.R.string.format_carbs, carbs.toInt()) }) row.addView(TextView(context).apply { gravity = Gravity.CENTER_HORIZONTAL; layoutParams = lp.apply { column = 5 }; text = rh.gs(info.nightscout.core.main.R.string.format_carbs, carbs
.toInt()) })
} }
} }

View file

@ -18,9 +18,8 @@ android {
dependencies { dependencies {
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':database:entities') implementation project(':database:entities')
implementation project(':core:main')
implementation project(':core:graph')
implementation project(':core:interfaces') implementation project(':core:interfaces')
implementation project(':core:main')
implementation project(':core:ns-sdk') implementation project(':core:ns-sdk')
implementation project(':core:utils') implementation project(':core:utils')
implementation project(':core:ui') implementation project(':core:ui')

View file

@ -17,9 +17,9 @@ android {
dependencies { dependencies {
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':core:graph')
implementation project(':core:graphview') implementation project(':core:graphview')
implementation project(':core:interfaces') implementation project(':core:interfaces')
implementation project(':core:main')
implementation project(':core:ui') implementation project(':core:ui')
implementation project(':core:utils') implementation project(':core:utils')
implementation project(':core:validators') implementation project(':core:validators')

View file

@ -18,10 +18,9 @@ dependencies {
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':database:entities') implementation project(':database:entities')
implementation project(':database:impl') implementation project(':database:impl')
implementation project(':core:main')
implementation project(':core:graph')
implementation project(':core:graphview') implementation project(':core:graphview')
implementation project(':core:interfaces') implementation project(':core:interfaces')
implementation project(':core:main')
implementation project(':core:ns-sdk') implementation project(':core:ns-sdk')
implementation project(':core:ui') implementation project(':core:ui')
implementation project(':core:utils') implementation project(':core:utils')

View file

@ -28,7 +28,7 @@ import info.nightscout.plugins.databinding.FoodFragmentBinding
import info.nightscout.plugins.databinding.FoodItemBinding import info.nightscout.plugins.databinding.FoodItemBinding
import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.AapsSchedulers
import info.nightscout.rx.bus.RxBus import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.events.EventFoodChanged import info.nightscout.rx.events.EventFoodDatabaseChanged
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import info.nightscout.shared.extensions.toVisibility import info.nightscout.shared.extensions.toVisibility
@ -92,7 +92,7 @@ class FoodFragment : DaggerFragment() {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
disposable += rxBus disposable += rxBus
.toObservable(EventFoodChanged::class.java) .toObservable(EventFoodDatabaseChanged::class.java)
.observeOn(aapsSchedulers.main) .observeOn(aapsSchedulers.main)
.debounce(1L, TimeUnit.SECONDS) .debounce(1L, TimeUnit.SECONDS)
.subscribe({ swapAdapter() }, fabricPrivacy::logException) .subscribe({ swapAdapter() }, fabricPrivacy::logException)

View file

@ -543,7 +543,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
if (quickWizardEntry != null && lastBG != null && profile != null && pump.isInitialized() && !pump.isSuspended() && !loop.isDisconnected) { if (quickWizardEntry != null && lastBG != null && profile != null && pump.isInitialized() && !pump.isSuspended() && !loop.isDisconnected) {
binding.buttonsLayout.quickWizardButton.visibility = View.VISIBLE binding.buttonsLayout.quickWizardButton.visibility = View.VISIBLE
val wizard = quickWizardEntry.doCalc(profile, profileName, lastBG) val wizard = quickWizardEntry.doCalc(profile, profileName, lastBG)
binding.buttonsLayout.quickWizardButton.text = quickWizardEntry.buttonText() + "\n" + rh.gs(info.nightscout.core.graph.R.string.format_carbs, quickWizardEntry.carbs()) + binding.buttonsLayout.quickWizardButton.text = quickWizardEntry.buttonText() + "\n" + rh.gs(info.nightscout.core.main.R.string.format_carbs, quickWizardEntry.carbs()) +
" " + rh.gs(info.nightscout.interfaces.R.string.format_insulin_units, wizard.calculatedTotalInsulin) " " + rh.gs(info.nightscout.interfaces.R.string.format_insulin_units, wizard.calculatedTotalInsulin)
if (wizard.calculatedTotalInsulin <= 0) binding.buttonsLayout.quickWizardButton.visibility = View.GONE if (wizard.calculatedTotalInsulin <= 0) binding.buttonsLayout.quickWizardButton.visibility = View.GONE
} else binding.buttonsLayout.quickWizardButton.visibility = View.GONE } else binding.buttonsLayout.quickWizardButton.visibility = View.GONE

View file

@ -5,7 +5,6 @@ include ':app-wear-shared:shared-impl'
include ':app-wear-shared:shared-tests' include ':app-wear-shared:shared-tests'
include ':core:main' include ':core:main'
include ':core:graphview' include ':core:graphview'
include ':core:graph'
include ':core:interfaces' include ':core:interfaces'
include ':core:libraries' include ':core:libraries'
include ':core:ns-sdk' include ':core:ns-sdk'

View file

@ -20,9 +20,8 @@ dependencies {
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':database:entities') implementation project(':database:entities')
implementation project(':database:impl') implementation project(':database:impl')
implementation project(':core:main')
implementation project(':core:interfaces') implementation project(':core:interfaces')
implementation project(':core:graph') implementation project(':core:main')
implementation project(':core:ui') implementation project(':core:ui')
implementation project(':core:utils') implementation project(':core:utils')

View file

@ -74,7 +74,7 @@ class QuickWizardListActivity : TranslatedDaggerAppCompatActivity(), OnStartDrag
holder.binding.from.text = dateUtil.timeString(entry.validFromDate()) holder.binding.from.text = dateUtil.timeString(entry.validFromDate())
holder.binding.to.text = dateUtil.timeString(entry.validToDate()) holder.binding.to.text = dateUtil.timeString(entry.validToDate())
holder.binding.buttonText.text = entry.buttonText() holder.binding.buttonText.text = entry.buttonText()
holder.binding.carbs.text = rh.gs(info.nightscout.core.graph.R.string.format_carbs, entry.carbs()) holder.binding.carbs.text = rh.gs(info.nightscout.core.main.R.string.format_carbs, entry.carbs())
if (entry.device() == QuickWizardEntry.DEVICE_ALL) { if (entry.device() == QuickWizardEntry.DEVICE_ALL) {
holder.binding.device.visibility = View.GONE holder.binding.device.visibility = View.GONE
} else { } else {
@ -194,7 +194,7 @@ class QuickWizardListActivity : TranslatedDaggerAppCompatActivity(), OnStartDrag
private fun getConfirmationText(selectedItems: SparseArray<QuickWizardEntry>): String { private fun getConfirmationText(selectedItems: SparseArray<QuickWizardEntry>): String {
if (selectedItems.size() == 1) { if (selectedItems.size() == 1) {
val entry = selectedItems.valueAt(0) val entry = selectedItems.valueAt(0)
return "${rh.gs(info.nightscout.core.ui.R.string.remove_button)} ${entry.buttonText()} ${rh.gs(info.nightscout.core.graph.R.string.format_carbs, entry.carbs())}\n" + return "${rh.gs(info.nightscout.core.ui.R.string.remove_button)} ${entry.buttonText()} ${rh.gs(info.nightscout.core.main.R.string.format_carbs, entry.carbs())}\n" +
"${dateUtil.timeString(entry.validFromDate())} - ${dateUtil.timeString(entry.validToDate())}" "${dateUtil.timeString(entry.validFromDate())} - ${dateUtil.timeString(entry.validToDate())}"
} }
return rh.gs(info.nightscout.core.ui.R.string.confirm_remove_multiple_items, selectedItems.size()) return rh.gs(info.nightscout.core.ui.R.string.confirm_remove_multiple_items, selectedItems.size())

View file

@ -257,7 +257,7 @@ class TreatmentsBolusCarbsFragment : DaggerFragment(), MenuProvider {
holder.binding.carbsLayout.visibility = (ml.carbs != null && (ml.carbs.isValid || showInvalidated)).toVisibility() holder.binding.carbsLayout.visibility = (ml.carbs != null && (ml.carbs.isValid || showInvalidated)).toVisibility()
ml.carbs?.let { carbs -> ml.carbs?.let { carbs ->
holder.binding.carbsTime.text = dateUtil.timeString(carbs.timestamp) holder.binding.carbsTime.text = dateUtil.timeString(carbs.timestamp)
holder.binding.carbs.text = rh.gs(info.nightscout.core.graph.R.string.format_carbs, carbs.amount.toInt()) holder.binding.carbs.text = rh.gs(info.nightscout.core.main.R.string.format_carbs, carbs.amount.toInt())
holder.binding.carbsDuration.text = if (carbs.duration > 0) rh.gs(info.nightscout.core.ui.R.string.format_mins, T.msecs(carbs.duration).mins().toInt()) else "" holder.binding.carbsDuration.text = if (carbs.duration > 0) rh.gs(info.nightscout.core.ui.R.string.format_mins, T.msecs(carbs.duration).mins().toInt()) else ""
holder.binding.carbsNs.visibility = (carbs.interfaceIDs.nightscoutId != null).toVisibility() holder.binding.carbsNs.visibility = (carbs.interfaceIDs.nightscoutId != null).toVisibility()
holder.binding.carbsPump.visibility = (carbs.interfaceIDs.pumpId != null).toVisibility() holder.binding.carbsPump.visibility = (carbs.interfaceIDs.pumpId != null).toVisibility()
@ -441,7 +441,7 @@ class TreatmentsBolusCarbsFragment : DaggerFragment(), MenuProvider {
rh.gs(info.nightscout.core.ui.R.string.date) + ": " + dateUtil.dateAndTimeString(bolus.timestamp) rh.gs(info.nightscout.core.ui.R.string.date) + ": " + dateUtil.dateAndTimeString(bolus.timestamp)
val carbs = mealLink.carbs val carbs = mealLink.carbs
if (carbs != null) if (carbs != null)
return rh.gs(info.nightscout.core.ui.R.string.carbs) + ": " + rh.gs(info.nightscout.core.graph.R.string.format_carbs, carbs.amount.toInt()) + "\n" + return rh.gs(info.nightscout.core.ui.R.string.carbs) + ": " + rh.gs(info.nightscout.core.main.R.string.format_carbs, carbs.amount.toInt()) + "\n" +
rh.gs(info.nightscout.core.ui.R.string.date) + ": " + dateUtil.dateAndTimeString(carbs.timestamp) rh.gs(info.nightscout.core.ui.R.string.date) + ": " + dateUtil.dateAndTimeString(carbs.timestamp)
} }
return rh.gs(info.nightscout.core.ui.R.string.confirm_remove_multiple_items, selectedItems.size()) return rh.gs(info.nightscout.core.ui.R.string.confirm_remove_multiple_items, selectedItems.size())

View file

@ -278,7 +278,7 @@ class CarbsDialog : DialogFragmentWithDate() {
if (duration > 0) if (duration > 0)
actions.add(rh.gs(info.nightscout.core.ui.R.string.duration) + ": " + duration + rh.gs(info.nightscout.shared.R.string.shorthour)) actions.add(rh.gs(info.nightscout.core.ui.R.string.duration) + ": " + duration + rh.gs(info.nightscout.shared.R.string.shorthour))
if (carbsAfterConstraints > 0) { if (carbsAfterConstraints > 0) {
actions.add(rh.gs(info.nightscout.core.ui.R.string.carbs) + ": " + "<font color='" + rh.gac(context, info.nightscout.core.ui.R.attr.carbsColor) + "'>" + rh.gs(info.nightscout.core.graph.R.string.format_carbs, carbsAfterConstraints) + "</font>") actions.add(rh.gs(info.nightscout.core.ui.R.string.carbs) + ": " + "<font color='" + rh.gac(context, info.nightscout.core.ui.R.attr.carbsColor) + "'>" + rh.gs(info.nightscout.core.main.R.string.format_carbs, carbsAfterConstraints) + "</font>")
if (carbsAfterConstraints != carbs) if (carbsAfterConstraints != carbs)
actions.add("<font color='" + rh.gac(context, info.nightscout.core.ui.R.attr.warningColor) + "'>" + rh.gs(R.string.carbs_constraint_applied) + "</font>") actions.add("<font color='" + rh.gac(context, info.nightscout.core.ui.R.attr.warningColor) + "'>" + rh.gs(R.string.carbs_constraint_applied) + "</font>")
} }

View file

@ -157,7 +157,8 @@ class TreatmentDialog : DialogFragmentWithDate() {
) )
} }
if (carbsAfterConstraints > 0) { if (carbsAfterConstraints > 0) {
actions.add(rh.gs(info.nightscout.core.ui.R.string.carbs) + ": " + rh.gs(info.nightscout.core.graph.R.string.format_carbs, carbsAfterConstraints).formatColor(context, rh, info.nightscout.core.ui.R.attr.carbsColor)) actions.add(rh.gs(info.nightscout.core.ui.R.string.carbs) + ": " + rh.gs(info.nightscout.core.main.R.string.format_carbs, carbsAfterConstraints).formatColor(context, rh, info.nightscout
.core.ui.R.attr.carbsColor))
if (carbsAfterConstraints != carbs) if (carbsAfterConstraints != carbs)
actions.add(rh.gs(R.string.carbs_constraint_applied).formatColor(context, rh, info.nightscout.core.ui.R.attr.warningColor)) actions.add(rh.gs(R.string.carbs_constraint_applied).formatColor(context, rh, info.nightscout.core.ui.R.attr.warningColor))
} }

View file

@ -516,7 +516,8 @@ class WizardDialog : DaggerDialogFragment() {
if (wizard.calculatedTotalInsulin > 0.0 || carbsAfterConstraint > 0.0) { if (wizard.calculatedTotalInsulin > 0.0 || carbsAfterConstraint > 0.0) {
val insulinText = if (wizard.calculatedTotalInsulin > 0.0) rh.gs(info.nightscout.interfaces.R.string.format_insulin_units, wizard.calculatedTotalInsulin).formatColor(context, rh, info.nightscout.core.ui.R.attr.bolusColor) else "" val insulinText = if (wizard.calculatedTotalInsulin > 0.0) rh.gs(info.nightscout.interfaces.R.string.format_insulin_units, wizard.calculatedTotalInsulin).formatColor(context, rh, info.nightscout.core.ui.R.attr.bolusColor) else ""
val carbsText = if (carbsAfterConstraint > 0.0) rh.gs(info.nightscout.core.graph.R.string.format_carbs, carbsAfterConstraint).formatColor(context, rh, info.nightscout.core.ui.R.attr.carbsColor) else "" val carbsText = if (carbsAfterConstraint > 0.0) rh.gs(info.nightscout.core.main.R.string.format_carbs, carbsAfterConstraint).formatColor(context, rh, info.nightscout.core.ui.R.attr
.carbsColor) else ""
binding.total.text = HtmlHelper.fromHtml(rh.gs(R.string.result_insulin_carbs, insulinText, carbsText)) binding.total.text = HtmlHelper.fromHtml(rh.gs(R.string.result_insulin_carbs, insulinText, carbsText))
binding.okcancel.ok.visibility = View.VISIBLE binding.okcancel.ok.visibility = View.VISIBLE
} else { } else {

View file

@ -20,9 +20,8 @@ dependencies {
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':database:entities') implementation project(':database:entities')
implementation project(':database:impl') implementation project(':database:impl')
implementation project(':core:main')
implementation project(':core:interfaces') implementation project(':core:interfaces')
implementation project(':core:graph') implementation project(':core:main')
implementation project(':core:ui') implementation project(':core:ui')
implementation project(':core:utils') implementation project(':core:utils')
} }