diff --git a/shared/data/src/commonMain/kotlin/fr/androidmakers/store/graphql/mappers.kt b/shared/data/src/commonMain/kotlin/fr/androidmakers/store/graphql/mappers.kt index 96e87ab0..eac93e4f 100644 --- a/shared/data/src/commonMain/kotlin/fr/androidmakers/store/graphql/mappers.kt +++ b/shared/data/src/commonMain/kotlin/fr/androidmakers/store/graphql/mappers.kt @@ -56,7 +56,8 @@ fun SessionDetails.toSession(): Session { roomId = this.room?.id ?: "", endsAt = this.endsAt, startsAt = this.startsAt, - isServiceSession = this.type == "service" + isServiceSession = this.type == "service", + type = type ) } diff --git a/shared/domain/src/commonMain/kotlin/fr/androidmakers/domain/model/Session.kt b/shared/domain/src/commonMain/kotlin/fr/androidmakers/domain/model/Session.kt index 1009905b..7585b109 100644 --- a/shared/domain/src/commonMain/kotlin/fr/androidmakers/domain/model/Session.kt +++ b/shared/domain/src/commonMain/kotlin/fr/androidmakers/domain/model/Session.kt @@ -25,4 +25,5 @@ data class Session( val duration: Duration = endsAt.toInstant(TimeZone.UTC) - startsAt.toInstant(TimeZone.UTC), val roomId: String, val isServiceSession: Boolean, + val type: String, ) diff --git a/shared/ui/src/commonMain/kotlin/com/androidmakers/ui/agenda/SessionDetailLayout.kt b/shared/ui/src/commonMain/kotlin/com/androidmakers/ui/agenda/SessionDetailLayout.kt index def66a47..a47694ab 100644 --- a/shared/ui/src/commonMain/kotlin/com/androidmakers/ui/agenda/SessionDetailLayout.kt +++ b/shared/ui/src/commonMain/kotlin/com/androidmakers/ui/agenda/SessionDetailLayout.kt @@ -248,26 +248,28 @@ private fun SessionDetails( .height(16.dp) ) - if (Clock.System.now() > sessionDetails.startTimestamp) { - OpenFeedback( - config = OpenFeedbackFirebaseConfig.default( - context = LocalPlatformContext.current - ), - projectId = "v6kx3QuQkDU4fX0Ta989", - sessionId = sessionDetails.session.id, - ) - } else { - Surface( - shape = RoundedCornerShape(5.dp), - border = BorderStroke(1.dp, separatorColor()), - modifier = Modifier.fillMaxWidth() - ) { - Text( - modifier = Modifier.padding(horizontal = 4.dp, vertical = 8.dp), - text = stringResource(MR.strings.feedbackWaiting), - style = MaterialTheme.typography.bodyMedium, - textAlign = TextAlign.Center + if (sessionDetails.session.type == "talk") { + if (Clock.System.now() > sessionDetails.startTimestamp) { + OpenFeedback( + config = OpenFeedbackFirebaseConfig.default( + context = LocalPlatformContext.current + ), + projectId = "v6kx3QuQkDU4fX0Ta989", + sessionId = sessionDetails.session.id, ) + } else { + Surface( + shape = RoundedCornerShape(5.dp), + border = BorderStroke(1.dp, separatorColor()), + modifier = Modifier.fillMaxWidth() + ) { + Text( + modifier = Modifier.padding(horizontal = 4.dp, vertical = 8.dp), + text = stringResource(MR.strings.feedbackWaiting), + style = MaterialTheme.typography.bodyMedium, + textAlign = TextAlign.Center + ) + } } }