diff --git a/app/src/main/kotlin/com/omricat/maplibrarian/chartlist/FirebaseChartsService.kt b/app/src/main/kotlin/com/omricat/maplibrarian/chartlist/FirebaseChartsService.kt index f4ec26e2..19b1cc27 100644 --- a/app/src/main/kotlin/com/omricat/maplibrarian/chartlist/FirebaseChartsService.kt +++ b/app/src/main/kotlin/com/omricat/maplibrarian/chartlist/FirebaseChartsService.kt @@ -57,7 +57,7 @@ class FirebaseChartsService( } private fun FirebaseFirestore.mapsCollection(user: User) = - collection("users").document(user.id.toString()).collection("maps") + collection("users").document(user.id.value).collection("maps") } /* diff --git a/app/src/main/kotlin/com/omricat/maplibrarian/userdetails/UserDetailsViewFactory.kt b/app/src/main/kotlin/com/omricat/maplibrarian/userdetails/UserDetailsViewFactory.kt index 8b207bd6..7769c467 100644 --- a/app/src/main/kotlin/com/omricat/maplibrarian/userdetails/UserDetailsViewFactory.kt +++ b/app/src/main/kotlin/com/omricat/maplibrarian/userdetails/UserDetailsViewFactory.kt @@ -9,6 +9,6 @@ import com.squareup.workflow1.ui.WorkflowUiExperimentalApi internal val UserDetailsViewFactory: ViewFactory = LayoutRunner.bind(LayoutUserDetailsBinding::inflate) { userDetailsScreen, _ -> - userId.text = userDetailsScreen.user.id.id + userId.text = userDetailsScreen.user.id.value this.btnSignOut.setOnClickListener { userDetailsScreen.onLogOutClicked() } } diff --git a/core/src/main/kotlin/com/omricat/maplibrarian/model/ChartModelMapSerialization.kt b/core/src/main/kotlin/com/omricat/maplibrarian/model/ChartModelMapSerialization.kt index a2e1bec4..02333d84 100644 --- a/core/src/main/kotlin/com/omricat/maplibrarian/model/ChartModelMapSerialization.kt +++ b/core/src/main/kotlin/com/omricat/maplibrarian/model/ChartModelMapSerialization.kt @@ -19,7 +19,7 @@ private object MapModelProperties { public object ChartModelToMapSerializer : ToMapSerializer { override operator fun invoke(model: UnsavedChartModel): Map = - hashMapOf(TITLE to model.title, USER_ID to model.userId.id) + hashMapOf(TITLE to model.title, USER_ID to model.userId.value) } public fun UnsavedChartModel.serializedToMap(): Map = ChartModelToMapSerializer(this) diff --git a/core/src/main/kotlin/com/omricat/maplibrarian/model/User.kt b/core/src/main/kotlin/com/omricat/maplibrarian/model/User.kt index 5453a298..14ad85ed 100644 --- a/core/src/main/kotlin/com/omricat/maplibrarian/model/User.kt +++ b/core/src/main/kotlin/com/omricat/maplibrarian/model/User.kt @@ -2,7 +2,7 @@ package com.omricat.maplibrarian.model import kotlinx.serialization.Serializable -@Serializable @JvmInline public value class UserUid(public val id: String) +@Serializable @JvmInline public value class UserUid(public val value: String) public interface User { public val displayName: String