Skip to content

Commit

Permalink
Merge pull request #1238 from joreilly/kmmbridge
Browse files Browse the repository at this point in the history
initial changes for service type...and avoiding showing as lightning talk
  • Loading branch information
joreilly authored Apr 5, 2024
2 parents 44e90b6 + 85eead1 commit ad597f1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package dev.johnoreilly.confetti.sessions

import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -46,6 +47,7 @@ import dev.johnoreilly.confetti.decompose.SessionsUiState
import dev.johnoreilly.confetti.fragment.SessionDetails
import dev.johnoreilly.confetti.isBreak
import dev.johnoreilly.confetti.isLightning
import dev.johnoreilly.confetti.isService
import dev.johnoreilly.confetti.sessionSpeakers
import dev.johnoreilly.confetti.ui.Bookmark
import dev.johnoreilly.confetti.ui.ErrorView
Expand Down Expand Up @@ -215,6 +217,11 @@ fun SessionItemView(
sessionSelected(session.id)
})
}

if (session.isService()) {
modifier = modifier.background(Color.White)
}

Row(modifier.padding(horizontal = 16.dp, vertical = 8.dp)) {
Column(modifier = Modifier.weight(1f)) {
Row(verticalAlignment = Alignment.CenterVertically) {
Expand Down
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ default_platform :android

platform :android do

androidVersionNum = 230
androidVersionNum = 232
wearVersionNum = 325

before_all do
Expand Down
1 change: 0 additions & 1 deletion shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ version = "0.9"
kmmbridge {
frameworkName.set("ConfettiKit")
addGithubPackagesRepository()
mavenPublishArtifacts()
spm()
timestampVersions()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import kotlinx.datetime.TimeZone
import kotlinx.datetime.toInstant

fun SessionDetails.isBreak() = this.type == "break"
fun SessionDetails.isService() = this.type == "service"

fun SessionDetails.isLightning() = endsAt.toInstant(TimeZone.UTC)
fun SessionDetails.isLightning() = !isService() &&
endsAt.toInstant(TimeZone.UTC)
.minus(startsAt.toInstant(TimeZone.UTC))
.inWholeMinutes <= 15

Expand Down

0 comments on commit ad597f1

Please sign in to comment.