diff --git a/README.md b/README.md index cc7281b..31d58e2 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ repository. ## What is this? -An unofficial Android client for [Mealie](https://hay-kot.github.io/mealie/). It enables you to +An unofficial Android client for [Mealie](https://github.com/mealie-recipes/mealie/). It enables you +to easily access your recipes using an Android device. The main advantage over website is that recipe data is stored locally and can be accessed without the Internet connection. diff --git a/app/build.gradle.kts b/app/build.gradle.kts index dc5b545..0c4ecaf 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -7,7 +7,6 @@ import java.util.Properties plugins { id("gq.kirmanak.mealient.application") id("kotlin-kapt") - id("androidx.navigation.safeargs.kotlin") id("dagger.hilt.android.plugin") alias(libs.plugins.ksp) alias(libs.plugins.appsweep) @@ -17,8 +16,8 @@ plugins { android { defaultConfig { applicationId = "gq.kirmanak.mealient" - versionCode = 34 - versionName = "0.4.5" + versionCode = 35 + versionName = "0.4.6" testInstrumentationRunner = "gq.kirmanak.mealient.MealientTestRunner" testInstrumentationRunnerArguments += mapOf("clearPackageData" to "true") resourceConfigurations += listOf("en", "es", "ru", "fr", "nl", "pt", "de") @@ -75,6 +74,9 @@ android { } } } + buildFeatures { + buildConfig = true + } } ksp { @@ -98,20 +100,11 @@ dependencies { implementation(libs.android.material.material) - implementation(libs.androidx.navigation.fragmentKtx) - implementation(libs.androidx.navigation.runtimeKtx) - implementation(libs.androidx.navigation.uiKtx) - implementation(libs.androidx.coreKtx) implementation(libs.androidx.splashScreen) implementation(libs.androidx.appcompat) - implementation(libs.androidx.constraintLayout) - - implementation(libs.androidx.swipeRefreshLayout) - - implementation(libs.androidx.lifecycle.livedataKtx) implementation(libs.androidx.lifecycle.viewmodelKtx) implementation(libs.androidx.shareTarget) @@ -131,8 +124,6 @@ dependencies { implementation(libs.jetbrains.kotlinx.datetime) - implementation(libs.kirich1409.viewBinding) - implementation(libs.androidx.datastore.preferences) implementation(libs.coil) diff --git a/app/src/main/java/gq/kirmanak/mealient/ui/BaseActivity.kt b/app/src/main/java/gq/kirmanak/mealient/ui/BaseActivity.kt deleted file mode 100644 index 495c696..0000000 --- a/app/src/main/java/gq/kirmanak/mealient/ui/BaseActivity.kt +++ /dev/null @@ -1,36 +0,0 @@ -package gq.kirmanak.mealient.ui - -import android.os.Bundle -import android.view.View -import androidx.annotation.IdRes -import androidx.annotation.LayoutRes -import androidx.appcompat.app.AppCompatActivity -import androidx.core.view.WindowInsetsControllerCompat -import androidx.viewbinding.ViewBinding -import by.kirich1409.viewbindingdelegate.viewBinding -import gq.kirmanak.mealient.extensions.isDarkThemeOn -import gq.kirmanak.mealient.logging.Logger -import javax.inject.Inject - -abstract class BaseActivity( - binder: (View) -> T, - @IdRes containerId: Int, - @LayoutRes layoutRes: Int, -) : AppCompatActivity(layoutRes) { - - protected val binding by viewBinding(binder, containerId) - - @Inject - lateinit var logger: Logger - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - logger.v { "onCreate() called with: savedInstanceState = $savedInstanceState" } - setContentView(binding.root) - with(WindowInsetsControllerCompat(window, window.decorView)) { - val isAppearanceLightBars = !isDarkThemeOn() - isAppearanceLightNavigationBars = isAppearanceLightBars - isAppearanceLightStatusBars = isAppearanceLightBars - } - } -} \ No newline at end of file diff --git a/app/src/main/java/gq/kirmanak/mealient/ui/recipes/info/IngredientsSection.kt b/app/src/main/java/gq/kirmanak/mealient/ui/recipes/info/IngredientsSection.kt index b9cb593..fc7aeb4 100644 --- a/app/src/main/java/gq/kirmanak/mealient/ui/recipes/info/IngredientsSection.kt +++ b/app/src/main/java/gq/kirmanak/mealient/ui/recipes/info/IngredientsSection.kt @@ -86,13 +86,14 @@ private fun IngredientListItem( onCheckedChange = { isChecked = it }, ) + val (text, note) = item.textAndNote Column { Text( - text = item.display, + text = text, style = MaterialTheme.typography.bodyLarge, ) - if (item.note.isNotBlank()) { + if (note.isNotBlank()) { Text( text = item.note, style = MaterialTheme.typography.bodyMedium, @@ -100,4 +101,21 @@ private fun IngredientListItem( } } } -} \ No newline at end of file +} + +private val RecipeIngredientEntity.textAndNote: Pair + get() = when { + disableAmount -> note to "" + + note.isBlank() -> display to "" + + else -> { + val text = if (display.endsWith(note)) { + display.dropLast(note.length).trimEnd() + } else { + display + } + + text to note + } + } \ No newline at end of file diff --git a/app/src/main/java/gq/kirmanak/mealient/ui/recipes/info/PreviewData.kt b/app/src/main/java/gq/kirmanak/mealient/ui/recipes/info/PreviewData.kt index c861b26..22fb68d 100644 --- a/app/src/main/java/gq/kirmanak/mealient/ui/recipes/info/PreviewData.kt +++ b/app/src/main/java/gq/kirmanak/mealient/ui/recipes/info/PreviewData.kt @@ -12,9 +12,11 @@ internal val INGREDIENT_TWO = RecipeIngredientEntity( note = "Recipe ingredient note", food = "Recipe ingredient food", unit = "Recipe ingredient unit", - display = "Recipe ingredient display that is very long and should be wrapped", quantity = 1.0, + display = "Recipe ingredient display that is very long and should be wrapped", title = null, + isFood = false, + disableAmount = true, ) internal val SUMMARY_ENTITY = RecipeSummaryEntity( @@ -34,9 +36,11 @@ internal val INGREDIENT_ONE = RecipeIngredientEntity( note = "Recipe ingredient note", food = "Recipe ingredient food", unit = "Recipe ingredient unit", - display = "Recipe ingredient display that is very long and should be wrapped", quantity = 1.0, + display = "Recipe ingredient display that is very long and should be wrapped", title = "Recipe ingredient section title", + isFood = false, + disableAmount = true, ) internal val INSTRUCTION_ONE = RecipeInstructionEntity( diff --git a/build-logic/convention/src/main/kotlin/gq/kirmanak/mealient/KotlinAndroid.kt b/build-logic/convention/src/main/kotlin/gq/kirmanak/mealient/KotlinAndroid.kt index db22559..1dc1ec2 100644 --- a/build-logic/convention/src/main/kotlin/gq/kirmanak/mealient/KotlinAndroid.kt +++ b/build-logic/convention/src/main/kotlin/gq/kirmanak/mealient/KotlinAndroid.kt @@ -67,7 +67,7 @@ internal fun Project.configureKotlinAndroid( } dependencies { - add("coreLibraryDesugaring", libs.findLibrary("android-tools-desugar").get()) + add("coreLibraryDesugaring", library("android-tools-desugar").get()) } } diff --git a/build.gradle.kts b/build.gradle.kts index 0365aea..e877699 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,6 @@ buildscript { classpath(libs.google.dagger.hiltPlugin) classpath(libs.jetbrains.kotlinPlugin) classpath(libs.jetbrains.serializationPlugin) - classpath(libs.androidx.navigation.safeArgsPlugin) } } diff --git a/database/src/main/kotlin/gq/kirmanak/mealient/database/AppDb.kt b/database/src/main/kotlin/gq/kirmanak/mealient/database/AppDb.kt index da16faa..911b3c2 100644 --- a/database/src/main/kotlin/gq/kirmanak/mealient/database/AppDb.kt +++ b/database/src/main/kotlin/gq/kirmanak/mealient/database/AppDb.kt @@ -1,11 +1,17 @@ package gq.kirmanak.mealient.database -import androidx.room.* +import androidx.room.Database +import androidx.room.RoomDatabase +import androidx.room.TypeConverters import gq.kirmanak.mealient.database.recipe.RecipeDao -import gq.kirmanak.mealient.database.recipe.entity.* +import gq.kirmanak.mealient.database.recipe.entity.RecipeEntity +import gq.kirmanak.mealient.database.recipe.entity.RecipeIngredientEntity +import gq.kirmanak.mealient.database.recipe.entity.RecipeIngredientToInstructionEntity +import gq.kirmanak.mealient.database.recipe.entity.RecipeInstructionEntity +import gq.kirmanak.mealient.database.recipe.entity.RecipeSummaryEntity @Database( - version = 11, + version = 12, entities = [ RecipeSummaryEntity::class, RecipeEntity::class, diff --git a/database/src/main/kotlin/gq/kirmanak/mealient/database/recipe/entity/RecipeIngredientEntity.kt b/database/src/main/kotlin/gq/kirmanak/mealient/database/recipe/entity/RecipeIngredientEntity.kt index 22903e4..a2519b4 100644 --- a/database/src/main/kotlin/gq/kirmanak/mealient/database/recipe/entity/RecipeIngredientEntity.kt +++ b/database/src/main/kotlin/gq/kirmanak/mealient/database/recipe/entity/RecipeIngredientEntity.kt @@ -25,4 +25,6 @@ data class RecipeIngredientEntity( @ColumnInfo(name = "recipe_ingredient_quantity") val quantity: Double?, @ColumnInfo(name = "recipe_ingredient_display") val display: String, @ColumnInfo(name = "recipe_ingredient_title") val title: String?, + @ColumnInfo(name = "recipe_ingredient_is_food") val isFood: Boolean, + @ColumnInfo(name = "recipe_ingredient_disable_amount") val disableAmount: Boolean, ) \ No newline at end of file diff --git a/database_test/src/main/kotlin/gq/kirmanak/mealient/database/TestData.kt b/database_test/src/main/kotlin/gq/kirmanak/mealient/database/TestData.kt index 77b3411..388aef9 100644 --- a/database_test/src/main/kotlin/gq/kirmanak/mealient/database/TestData.kt +++ b/database_test/src/main/kotlin/gq/kirmanak/mealient/database/TestData.kt @@ -70,22 +70,26 @@ val CAKE_SUGAR_RECIPE_INGREDIENT_ENTITY = RecipeIngredientEntity( id = "1", recipeId = "1", note = "2 oz of white sugar", - quantity = 1.0, - unit = null, food = null, + unit = null, + quantity = 1.0, display = "2 oz of white sugar", title = "Sugar", + isFood = false, + disableAmount = true, ) val CAKE_BREAD_RECIPE_INGREDIENT_ENTITY = RecipeIngredientEntity( id = "3", recipeId = "1", note = "2 oz of white bread", - quantity = 1.0, - unit = null, food = null, + unit = null, + quantity = 1.0, display = "2 oz of white bread", title = null, + isFood = false, + disableAmount = true, ) val FULL_CAKE_INFO_ENTITY = RecipeWithSummaryAndIngredientsAndInstructions( @@ -115,22 +119,26 @@ val PORRIDGE_MILK_RECIPE_INGREDIENT_ENTITY = RecipeIngredientEntity( id = "1", recipeId = "2", note = "2 oz of white milk", - quantity = 1.0, - unit = null, food = null, + unit = null, + quantity = 1.0, display = "2 oz of white milk", title = null, + isFood = false, + disableAmount = true, ) val PORRIDGE_SUGAR_RECIPE_INGREDIENT_ENTITY = RecipeIngredientEntity( id = "2", recipeId = "2", note = "2 oz of white sugar", - quantity = 1.0, - unit = null, food = null, + unit = null, + quantity = 1.0, display = "2 oz of white sugar", title = "Sugar", + isFood = false, + disableAmount = true, ) val PORRIDGE_MIX_RECIPE_INSTRUCTION_ENTITY = RecipeInstructionEntity( diff --git a/datasource/build.gradle.kts b/datasource/build.gradle.kts index 7ae367a..f8c9342 100644 --- a/datasource/build.gradle.kts +++ b/datasource/build.gradle.kts @@ -11,6 +11,9 @@ android { consumerProguardFiles("consumer-proguard-rules.pro") } namespace = "gq.kirmanak.mealient.datasource" + buildFeatures { + buildConfig = true + } } dependencies { diff --git a/datasource/src/main/kotlin/gq/kirmanak/mealient/datasource/models/GetRecipeResponse.kt b/datasource/src/main/kotlin/gq/kirmanak/mealient/datasource/models/GetRecipeResponse.kt index 1d6f0b7..3007789 100644 --- a/datasource/src/main/kotlin/gq/kirmanak/mealient/datasource/models/GetRecipeResponse.kt +++ b/datasource/src/main/kotlin/gq/kirmanak/mealient/datasource/models/GetRecipeResponse.kt @@ -27,6 +27,8 @@ data class GetRecipeIngredientResponse( @SerialName("display") val display: String, @SerialName("referenceId") val referenceId: String, @SerialName("title") val title: String?, + @SerialName("isFood") val isFood: Boolean, + @SerialName("disableAmount") val disableAmount: Boolean, ) @Serializable diff --git a/datasource_test/src/main/kotlin/gq/kirmanak/mealient/datasource_test/TestData.kt b/datasource_test/src/main/kotlin/gq/kirmanak/mealient/datasource_test/TestData.kt index de80df8..a517707 100644 --- a/datasource_test/src/main/kotlin/gq/kirmanak/mealient/datasource_test/TestData.kt +++ b/datasource_test/src/main/kotlin/gq/kirmanak/mealient/datasource_test/TestData.kt @@ -74,32 +74,38 @@ val PORRIDGE_RECIPE_SUMMARY_RESPONSE = GetRecipeSummaryResponse( val MILK_RECIPE_INGREDIENT_RESPONSE = GetRecipeIngredientResponse( note = "2 oz of white milk", - quantity = 1.0, unit = null, food = null, + quantity = 1.0, display = "2 oz of white milk", referenceId = "1", title = null, + isFood = false, + disableAmount = true, ) val SUGAR_RECIPE_INGREDIENT_RESPONSE = GetRecipeIngredientResponse( note = "2 oz of white sugar", - quantity = 1.0, unit = null, food = null, + quantity = 1.0, display = "2 oz of white sugar", referenceId = "1", title = "Sugar", + isFood = false, + disableAmount = true, ) val BREAD_RECIPE_INGREDIENT_RESPONSE = GetRecipeIngredientResponse( note = "2 oz of white bread", - quantity = 1.0, unit = null, food = null, + quantity = 1.0, display = "2 oz of white bread", referenceId = "3", title = null, + isFood = false, + disableAmount = true, ) val MIX_RECIPE_INSTRUCTION_RESPONSE = GetRecipeInstructionResponse( diff --git a/fastlane/metadata/android/en-US/changelogs/35.txt b/fastlane/metadata/android/en-US/changelogs/35.txt new file mode 100644 index 0000000..5432a40 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/35.txt @@ -0,0 +1 @@ +Improve onboarding experience \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index a47b47c..c6ed8e9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,6 +5,5 @@ android.useAndroidX=true android.enableJetifier=false kotlin.code.style=official kapt.incremental.apt=true -android.defaults.buildfeatures.buildconfig=true android.nonTransitiveRClass=false android.nonFinalResIds=false \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e3ac20c..982c68f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,50 +1,40 @@ [versions] # https://maven.google.com/web/index.html?q=com.android.tools.build#com.android.tools.build:gradle -androidGradlePlugin = "8.1.2" +androidGradlePlugin = "8.2.1" # https://github.com/JetBrains/kotlin/releases -kotlin = "1.9.10" -# https://developer.android.com/jetpack/androidx/releases/navigation -googleNavigation = "2.7.4" +kotlin = "1.9.22" # https://dagger.dev/hilt/gradle-setup -hilt = "2.48.1" +hilt = "2.50" # https://github.com/protocolbuffers/protobuf/releases -protobuf = "3.24.4" +protobuf = "3.25.2" # https://github.com/google/protobuf-gradle-plugin/releases protobufPlugin = "0.9.4" # https://plugins.gradle.org/plugin/org.sonarqube sonarqube = "4.4.1.3373" # https://plugins.gradle.org/plugin/com.guardsquare.appsweep -appsweep = "1.5.2" +appsweep = "1.5.6" # https://github.com/material-components/material-components-android/releases -material = "1.10.0" +material = "1.11.0" # https://developer.android.com/kotlin/ktx#core coreKtx = "1.12.0" # https://developer.android.com/jetpack/androidx/releases/appcompat appcompat = "1.6.1" -# https://developer.android.com/jetpack/androidx/releases/constraintlayout -contraintLayout = "2.1.4" -# https://developer.android.com/jetpack/androidx/releases/swiperefreshlayout -swipeRefreshLayout = "1.1.0" # https://developer.android.com/jetpack/androidx/releases/core splashScreen = "1.0.1" # https://developer.android.com/jetpack/androidx/releases/lifecycle -lifecycle = "2.6.2" +lifecycle = "2.7.0" # https://developer.android.com/jetpack/androidx/releases/arch-core coreTesting = "2.2.0" # https://github.com/Kotlin/kotlinx.serialization/releases -kotlinxSerialization = "1.6.0" +kotlinxSerialization = "1.6.2" # https://github.com/square/okhttp/tags okhttp = "4.12.0" # https://developer.android.com/jetpack/androidx/releases/paging paging = "3.2.1" # https://developer.android.com/jetpack/androidx/releases/room -room = "2.6.0" +room = "2.6.1" # https://github.com/Kotlin/kotlinx-datetime/releases -kotlinxDatetime = "0.4.0" -# https://github.com/bumptech/glide/releases -glide = "4.16.0" -# https://github.com/androidbroadcast/ViewBindingPropertyDelegate/releases -viewBindingDelegate = "1.5.9" +kotlinxDatetime = "0.5.0" # https://developer.android.com/jetpack/androidx/releases/datastore datastore = "1.0.0" # https://developer.android.com/jetpack/androidx/releases/security @@ -54,19 +44,19 @@ junit = "4.13.2" # https://github.com/Kotlin/kotlinx.coroutines/releases coroutines = "1.7.3" # https://github.com/robolectric/robolectric/releases -robolectric = "4.11" +robolectric = "4.11.1" # https://mvnrepository.com/artifact/com.google.truth/truth -truth = "1.1.5" +truth = "1.2.0" # https://mockk.io/ -mockk = "1.13.8" +mockk = "1.13.9" # https://github.com/square/leakcanary/releases -leakcanary = "2.12" +leakcanary = "2.13" # https://github.com/ChuckerTeam/chucker/releases chucker = "4.0.0" # https://github.com/google/desugar_jdk_libs/blob/master/CHANGELOG.md -desugar = "2.0.3" +desugar = "2.0.4" # https://github.com/google/ksp/releases -kspPlugin = "1.9.10-1.0.13" +kspPlugin = "1.9.22-1.0.16" # https://developer.android.com/jetpack/androidx/releases/sharetarget shareTarget = "1.2.0" # https://github.com/KasperskyLab/Kaspresso/releases @@ -80,17 +70,17 @@ junitKtx = "1.1.5" # https://mvnrepository.com/artifact/androidx.compose/compose-bom composeBom = "2023.10.01" # https://developer.android.com/jetpack/androidx/releases/compose-kotlin -composeKotlinCompilerExtension = "1.5.3" +composeKotlinCompilerExtension = "1.5.8" # https://google.github.io/accompanist/ accompanistVersion = "0.32.0" # https://developer.android.com/jetpack/androidx/releases/compose-material materialCompose = "1.5.4" -# https://github.com/raamcosta/compose-destinations -composeDestinations = "1.9.54" +# https://github.com/raamcosta/compose-destinations/releases +composeDestinations = "1.9.59" # https://developer.android.com/jetpack/androidx/releases/hilt androidxHilt = "1.1.0" # https://github.com/ktorio/ktor/releases -ktor = "2.3.5" +ktor = "2.3.7" # https://github.com/coil-kt/coil/releases coil = "2.5.0" @@ -135,15 +125,8 @@ jetbrains-kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx- jetbrains-kotlinx-coroutinesAndroid = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "coroutines" } jetbrains-kotlinx-coroutinesTest = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "coroutines" } -androidx-navigation-safeArgsPlugin = { group = "androidx.navigation", name = "navigation-safe-args-gradle-plugin", version.ref = "googleNavigation" } -androidx-navigation-fragmentKtx = { group = "androidx.navigation", name = "navigation-fragment-ktx", version.ref = "googleNavigation" } -androidx-navigation-runtimeKtx = { group = "androidx.navigation", name = "navigation-runtime-ktx", version.ref = "googleNavigation" } -androidx-navigation-uiKtx = { group = "androidx.navigation", name = "navigation-ui-ktx", version.ref = "googleNavigation" } - androidx-coreKtx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } -androidx-constraintLayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "contraintLayout" } -androidx-swipeRefreshLayout = { group = "androidx.swiperefreshlayout", name = "swiperefreshlayout", version.ref = "swipeRefreshLayout" } androidx-splashScreen = { group = "androidx.core", name = "core-splashscreen", version.ref = "splashScreen" } androidx-coreTesting = { group = "androidx.arch.core", name = "core-testing", version.ref = "coreTesting" } androidx-shareTarget = { group = "androidx.sharetarget", name = "sharetarget", version.ref = "shareTarget" } @@ -152,7 +135,6 @@ androidx-paging-runtimeKtx = { group = "androidx.paging", name = "paging-runtime androidx-paging-commonKtx = { group = "androidx.paging", name = "paging-common-ktx", version.ref = "paging" } androidx-paging-compose = { group = "androidx.paging", name = "paging-compose", version.ref = "paging" } -androidx-lifecycle-livedataKtx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycle" } androidx-lifecycle-viewmodelKtx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycle" } androidx-lifecycle-viewmodelCompose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycle" } @@ -180,13 +162,6 @@ okhttp3-okhttp = { group = "com.squareup.okhttp3", name = "okhttp" } okhttp3-loggingInterceptor = { group = "com.squareup.okhttp3", name = "logging-interceptor" } okhttp3-mockwebserver = { group = "com.squareup.okhttp3", name = "mockwebserver", version.ref = "okhttp" } -bumptech-glide-glide = { group = "com.github.bumptech.glide", name = "glide", version.ref = "glide" } -bumptech-glide-okhttp3 = { group = "com.github.bumptech.glide", name = "okhttp3-integration", version.ref = "glide" } -bumptech-glide-recyclerview = { group = "com.github.bumptech.glide", name = "recyclerview-integration", version.ref = "glide" } -bumptech-glide-ksp = { group = "com.github.bumptech.glide", name = "ksp", version.ref = "glide" } - -kirich1409-viewBinding = { group = "com.github.kirich1409", name = "viewbindingpropertydelegate-noreflection", version.ref = "viewBindingDelegate" } - junit = { group = "junit", name = "junit", version.ref = "junit" } robolectric = { group = "org.robolectric", name = "robolectric", version.ref = "robolectric" } diff --git a/model_mapper/src/main/kotlin/gq/kirmanak/mealient/model_mapper/ModelMapperImpl.kt b/model_mapper/src/main/kotlin/gq/kirmanak/mealient/model_mapper/ModelMapperImpl.kt index 4071510..fc6431c 100644 --- a/model_mapper/src/main/kotlin/gq/kirmanak/mealient/model_mapper/ModelMapperImpl.kt +++ b/model_mapper/src/main/kotlin/gq/kirmanak/mealient/model_mapper/ModelMapperImpl.kt @@ -37,11 +37,13 @@ class ModelMapperImpl @Inject constructor() : ModelMapper { id = ingredientResponse.referenceId, recipeId = recipeId, note = ingredientResponse.note, - unit = ingredientResponse.unit?.name, food = ingredientResponse.food?.name, + unit = ingredientResponse.unit?.name, quantity = ingredientResponse.quantity, display = ingredientResponse.display, title = ingredientResponse.title, + isFood = ingredientResponse.isFood, + disableAmount = ingredientResponse.disableAmount, ) override fun toRecipeInstructionEntity(