Fix incompatibility with Mealie v1.11.0 (#302)
* Allow dateUpdated field to contain time zone * Remove unused dateUpdated field * Update version code
This commit is contained in:
@@ -13,8 +13,8 @@ plugins {
|
||||
android {
|
||||
defaultConfig {
|
||||
applicationId = "gq.kirmanak.mealient"
|
||||
versionCode = 36
|
||||
versionName = "0.4.7"
|
||||
versionCode = 37
|
||||
versionName = "0.4.8"
|
||||
testInstrumentationRunner = "gq.kirmanak.mealient.MealientTestRunner"
|
||||
testInstrumentationRunnerArguments += mapOf("clearPackageData" to "true")
|
||||
resourceConfigurations += listOf("en", "es", "ru", "fr", "nl", "pt", "de")
|
||||
|
||||
@@ -4,7 +4,6 @@ import gq.kirmanak.mealient.database.recipe.entity.RecipeIngredientEntity
|
||||
import gq.kirmanak.mealient.database.recipe.entity.RecipeInstructionEntity
|
||||
import gq.kirmanak.mealient.database.recipe.entity.RecipeSummaryEntity
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
|
||||
internal val INGREDIENT_TWO = RecipeIngredientEntity(
|
||||
id = "2",
|
||||
@@ -25,7 +24,6 @@ internal val SUMMARY_ENTITY = RecipeSummaryEntity(
|
||||
slug = "recipe-name",
|
||||
description = "Recipe description",
|
||||
dateAdded = LocalDate(2021, 1, 1),
|
||||
dateUpdated = LocalDateTime(2021, 1, 1, 1, 1, 1),
|
||||
imageId = null,
|
||||
isFavorite = false,
|
||||
)
|
||||
|
||||
@@ -11,7 +11,7 @@ import gq.kirmanak.mealient.database.recipe.entity.RecipeInstructionEntity
|
||||
import gq.kirmanak.mealient.database.recipe.entity.RecipeSummaryEntity
|
||||
|
||||
@Database(
|
||||
version = 12,
|
||||
version = 13,
|
||||
entities = [
|
||||
RecipeSummaryEntity::class,
|
||||
RecipeEntity::class,
|
||||
|
||||
@@ -4,7 +4,6 @@ import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
|
||||
@Entity(tableName = "recipe_summaries")
|
||||
data class RecipeSummaryEntity(
|
||||
@@ -13,7 +12,6 @@ data class RecipeSummaryEntity(
|
||||
@ColumnInfo(name = "recipe_summaries_slug") val slug: String,
|
||||
@ColumnInfo(name = "recipe_summaries_description") val description: String,
|
||||
@ColumnInfo(name = "recipe_summaries_date_added") val dateAdded: LocalDate,
|
||||
@ColumnInfo(name = "recipe_summaries_date_updated") val dateUpdated: LocalDateTime,
|
||||
@ColumnInfo(name = "recipe_summaries_image_id") val imageId: String?,
|
||||
@ColumnInfo(name = "recipe_summaries_is_favorite") val isFavorite: Boolean,
|
||||
)
|
||||
@@ -7,7 +7,6 @@ import gq.kirmanak.mealient.database.recipe.entity.RecipeInstructionEntity
|
||||
import gq.kirmanak.mealient.database.recipe.entity.RecipeSummaryEntity
|
||||
import gq.kirmanak.mealient.database.recipe.entity.RecipeWithSummaryAndIngredientsAndInstructions
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
|
||||
val CAKE_RECIPE_SUMMARY_ENTITY = RecipeSummaryEntity(
|
||||
remoteId = "1",
|
||||
@@ -15,7 +14,6 @@ val CAKE_RECIPE_SUMMARY_ENTITY = RecipeSummaryEntity(
|
||||
slug = "cake",
|
||||
description = "A tasty cake",
|
||||
dateAdded = LocalDate.parse("2021-11-13"),
|
||||
dateUpdated = LocalDateTime.parse("2021-11-13T15:30:13"),
|
||||
imageId = "1",
|
||||
isFavorite = false,
|
||||
)
|
||||
@@ -26,7 +24,6 @@ val PORRIDGE_RECIPE_SUMMARY_ENTITY = RecipeSummaryEntity(
|
||||
slug = "porridge",
|
||||
description = "A tasty porridge",
|
||||
dateAdded = LocalDate.parse("2021-11-12"),
|
||||
dateUpdated = LocalDateTime.parse("2021-10-13T17:35:23"),
|
||||
imageId = "2",
|
||||
isFavorite = false,
|
||||
)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package gq.kirmanak.mealient.datasource.models
|
||||
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@@ -11,6 +10,5 @@ data class GetRecipeSummaryResponse(
|
||||
@SerialName("name") val name: String,
|
||||
@SerialName("slug") val slug: String,
|
||||
@SerialName("description") val description: String = "",
|
||||
@SerialName("dateAdded") val dateAdded: LocalDate,
|
||||
@SerialName("dateUpdated") val dateUpdated: LocalDateTime
|
||||
@SerialName("dateAdded") val dateAdded: LocalDate
|
||||
)
|
||||
@@ -16,7 +16,6 @@ import gq.kirmanak.mealient.datasource.models.GetRecipeSettingsResponse
|
||||
import gq.kirmanak.mealient.datasource.models.GetRecipeSummaryResponse
|
||||
import gq.kirmanak.mealient.datasource.models.UpdateRecipeRequest
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
|
||||
val RECIPE_SUMMARY_CAKE = GetRecipeSummaryResponse(
|
||||
remoteId = "1",
|
||||
@@ -24,7 +23,6 @@ val RECIPE_SUMMARY_CAKE = GetRecipeSummaryResponse(
|
||||
slug = "cake",
|
||||
description = "A tasty cake",
|
||||
dateAdded = LocalDate.parse("2021-11-13"),
|
||||
dateUpdated = LocalDateTime.parse("2021-11-13T15:30:13"),
|
||||
)
|
||||
|
||||
val RECIPE_SUMMARY_PORRIDGE = GetRecipeSummaryResponse(
|
||||
@@ -33,7 +31,6 @@ val RECIPE_SUMMARY_PORRIDGE = GetRecipeSummaryResponse(
|
||||
slug = "porridge",
|
||||
description = "A tasty porridge",
|
||||
dateAdded = LocalDate.parse("2021-11-12"),
|
||||
dateUpdated = LocalDateTime.parse("2021-10-13T17:35:23"),
|
||||
)
|
||||
|
||||
val TEST_RECIPE_SUMMARIES = listOf(RECIPE_SUMMARY_CAKE, RECIPE_SUMMARY_PORRIDGE)
|
||||
@@ -69,7 +66,6 @@ val PORRIDGE_RECIPE_SUMMARY_RESPONSE = GetRecipeSummaryResponse(
|
||||
slug = "porridge",
|
||||
description = "A tasty porridge",
|
||||
dateAdded = LocalDate.parse("2021-11-12"),
|
||||
dateUpdated = LocalDateTime.parse("2021-10-13T17:35:23"),
|
||||
)
|
||||
|
||||
val MILK_RECIPE_INGREDIENT_RESPONSE = GetRecipeIngredientResponse(
|
||||
|
||||
1
fastlane/metadata/android/en-US/changelogs/37.txt
Normal file
1
fastlane/metadata/android/en-US/changelogs/37.txt
Normal file
@@ -0,0 +1 @@
|
||||
Fixed incompatibility with Mealie v1.11.0.
|
||||
@@ -66,7 +66,6 @@ class ModelMapperImpl @Inject constructor() : ModelMapper {
|
||||
slug = recipeSummaryInfo.slug,
|
||||
description = recipeSummaryInfo.description,
|
||||
dateAdded = recipeSummaryInfo.dateAdded,
|
||||
dateUpdated = recipeSummaryInfo.dateUpdated,
|
||||
imageId = recipeSummaryInfo.remoteId,
|
||||
isFavorite = isFavorite,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user