Skip to content

Commit

Permalink
no OpenFeedback for opening & closing keynotes
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin committed Apr 19, 2024
1 parent 738ae7d commit fc1b5e3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}
}
}

Expand Down

0 comments on commit fc1b5e3

Please sign in to comment.