Skip to content

Commit 1017553

Browse files
committed
Add initial UI for showing session recording link
1 parent 561417a commit 1017553

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

fastlane/Fastfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ default_platform :android
44

55
platform :android do
66

7-
androidVersionNum = 258
7+
androidVersionNum = 259
88
wearVersionNum = 332
99

1010
before_all do

shared/src/commonMain/kotlin/dev/johnoreilly/confetti/ui/sessions/SessionDetailsViewShared.kt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import androidx.compose.foundation.text.selection.SelectionContainer
1919
import androidx.compose.foundation.verticalScroll
2020
import androidx.compose.material.icons.Icons
2121
import androidx.compose.material.icons.filled.Person
22+
import androidx.compose.material.icons.filled.PlayCircle
23+
import androidx.compose.material3.Button
2224
import androidx.compose.material3.CircularProgressIndicator
2325
import androidx.compose.material3.Icon
2426
import androidx.compose.material3.IconButton
@@ -31,6 +33,7 @@ import androidx.compose.ui.Modifier
3133
import androidx.compose.ui.draw.clip
3234
import androidx.compose.ui.graphics.vector.ImageVector
3335
import androidx.compose.ui.layout.ContentScale
36+
import androidx.compose.ui.platform.LocalUriHandler
3437
import androidx.compose.ui.semantics.Role
3538
import androidx.compose.ui.text.font.FontStyle
3639
import androidx.compose.ui.text.font.FontWeight
@@ -134,6 +137,25 @@ fun SessionDetailViewShared(
134137

135138
Spacer(modifier = Modifier.size(16.dp))
136139
}
140+
141+
session.recordingUrl?.let { recordingUrl ->
142+
val uriHandler = LocalUriHandler.current
143+
144+
ConfettiHeader(
145+
text = "Recording",
146+
icon = Icons.Filled.PlayCircle,
147+
)
148+
149+
Spacer(modifier = Modifier.size(16.dp))
150+
151+
Column(modifier = Modifier.padding(contentPadding)) {
152+
Button(onClick = { uriHandler.openUri(recordingUrl)}) {
153+
Text("Watch Recording")
154+
}
155+
}
156+
157+
Spacer(modifier = Modifier.size(16.dp))
158+
}
137159
}
138160
}
139161
}

wearApp/src/main/java/dev/johnoreilly/confetti/wear/preview/TestFixtures.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ The talk will cover
144144
),
145145
room = SessionDetails.Room(name = "Effectenbeurszaal", id = "1", __typename = "Room"),
146146
tags = listOf(),
147-
__typename = "Session"
147+
__typename = "Session",
148+
recordingUrl = null,
148149
)
149150
}

0 commit comments

Comments
 (0)