diff --git a/core/data/src/main/kotlin/app/aaps/core/data/ue/Sources.kt b/core/data/src/main/kotlin/app/aaps/core/data/ue/Sources.kt index ca87f4009cb..f08facb1052 100644 --- a/core/data/src/main/kotlin/app/aaps/core/data/ue/Sources.kt +++ b/core/data/src/main/kotlin/app/aaps/core/data/ue/Sources.kt @@ -71,6 +71,7 @@ enum class Sources { Aaps, // MainApp BgFragment, Garmin, + Database, // for PersistenceLayer Unknown //if necessary ; } \ No newline at end of file diff --git a/plugins/configuration/src/main/res/drawable/ic_database_cleanup.xml b/core/ui/src/main/res/drawable/ic_database_cleanup.xml similarity index 100% rename from plugins/configuration/src/main/res/drawable/ic_database_cleanup.xml rename to core/ui/src/main/res/drawable/ic_database_cleanup.xml diff --git a/database/impl/src/main/kotlin/app/aaps/database/entities/UserEntry.kt b/database/impl/src/main/kotlin/app/aaps/database/entities/UserEntry.kt index fc6e7170836..29777f69f8e 100644 --- a/database/impl/src/main/kotlin/app/aaps/database/entities/UserEntry.kt +++ b/database/impl/src/main/kotlin/app/aaps/database/entities/UserEntry.kt @@ -187,6 +187,7 @@ data class UserEntry( Aaps, // MainApp BgFragment, Garmin, + Database, //for PersistenceLayer Unknown //if necessary ; diff --git a/database/persistence/src/main/kotlin/app/aaps/database/persistence/converters/SourcesExtension.kt b/database/persistence/src/main/kotlin/app/aaps/database/persistence/converters/SourcesExtension.kt index a816696ac2c..06da6771788 100644 --- a/database/persistence/src/main/kotlin/app/aaps/database/persistence/converters/SourcesExtension.kt +++ b/database/persistence/src/main/kotlin/app/aaps/database/persistence/converters/SourcesExtension.kt @@ -75,6 +75,7 @@ fun UserEntry.Sources.fromDb(): Sources = UserEntry.Sources.Aaps -> Sources.Aaps UserEntry.Sources.BgFragment -> Sources.BgFragment UserEntry.Sources.Garmin -> Sources.Garmin + UserEntry.Sources.Database -> Sources.Database UserEntry.Sources.Unknown -> Sources.Unknown } @@ -150,6 +151,7 @@ fun Sources.toDb(): UserEntry.Sources = Sources.Aaps -> UserEntry.Sources.Aaps Sources.BgFragment -> UserEntry.Sources.BgFragment Sources.Garmin -> UserEntry.Sources.Garmin + Sources.Database -> UserEntry.Sources.Database Sources.Unknown -> UserEntry.Sources.Unknown } diff --git a/implementation/src/main/kotlin/app/aaps/implementation/queue/CommandQueueImplementation.kt b/implementation/src/main/kotlin/app/aaps/implementation/queue/CommandQueueImplementation.kt index 4e725805543..15a9f64f3aa 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/queue/CommandQueueImplementation.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/queue/CommandQueueImplementation.kt @@ -275,7 +275,7 @@ class CommandQueueImplementation @Inject constructor( disposable += persistenceLayer.insertOrUpdateCarbs( carbs = detailedBolusInfo.createCarbs(), action = Action.CARBS, - source = Sources.TreatmentDialog + source = Sources.Database ).subscribe( { callback?.result(instantiator.providePumpEnactResult().enacted(false).success(true))?.run() }, { callback?.result(instantiator.providePumpEnactResult().enacted(false).success(false))?.run() } diff --git a/implementation/src/main/kotlin/app/aaps/implementation/userEntry/UserEntryPresentationHelperImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/userEntry/UserEntryPresentationHelperImpl.kt index 24f3dd4412c..f9f14ecd39f 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/userEntry/UserEntryPresentationHelperImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/userEntry/UserEntryPresentationHelperImpl.kt @@ -109,6 +109,7 @@ class UserEntryPresentationHelperImpl @Inject constructor( Sources.Overview -> app.aaps.core.ui.R.drawable.ic_home Sources.Aaps -> R.drawable.ic_aaps Sources.Garmin -> app.aaps.core.ui.R.drawable.ic_generic_icon + Sources.Database -> app.aaps.core.ui.R.drawable.ic_database_cleanup Sources.Unknown -> app.aaps.core.ui.R.drawable.ic_generic_icon Sources.Random -> R.drawable.ic_aaps Sources.BgFragment -> R.drawable.ic_aaps