diff --git a/shared-ui/build.gradle.kts b/shared-ui/build.gradle.kts index bad22df6..a5ed24e0 100644 --- a/shared-ui/build.gradle.kts +++ b/shared-ui/build.gradle.kts @@ -32,7 +32,7 @@ android { listOf( "src/androidMain/resources", "src/commonMain/resources", - ) + ), ) main.manifest.srcFile("src/androidMain/AndroidManifest.xml") } diff --git a/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt b/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt index 629b1226..b9fdec12 100644 --- a/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt +++ b/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt @@ -26,11 +26,11 @@ internal actual fun PlatformSwitchApp() { context.startActivity( Intent( Intent.ACTION_VIEW, - Uri.parse("market://details?id=${Constants.SisterApp.androidPackageName}") - ) + Uri.parse("market://details?id=${Constants.SisterApp.androidPackageName}"), + ), ) } - } + }, ) { Text("Open ${Constants.SisterApp.name}") } diff --git a/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/theme/Type.android.kt b/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/theme/Type.android.kt index fd803324..43de2f78 100644 --- a/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/theme/Type.android.kt +++ b/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/theme/Type.android.kt @@ -16,5 +16,5 @@ actual val montserratFontFamily: FontFamily = FontFamily( montserratRegularFont, montserratMediumFont, montserratSemiBoldFont, - montserratBoldFont + montserratBoldFont, ) diff --git a/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/util/Dialog.kt b/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/util/Dialog.kt index 82eb170e..50d1c2cd 100644 --- a/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/util/Dialog.kt +++ b/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/util/Dialog.kt @@ -1,8 +1,8 @@ package co.touchlab.droidcon.ui.util +import androidx.compose.ui.window.Dialog as AndroidXComposeDialog import androidx.compose.runtime.Composable import androidx.compose.ui.ExperimentalComposeUiApi -import androidx.compose.ui.window.Dialog as AndroidXComposeDialog import androidx.compose.ui.window.DialogProperties @OptIn(ExperimentalComposeUiApi::class) diff --git a/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/util/LocalImage.jvm.kt b/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/util/LocalImage.jvm.kt index 7ab27810..587c72ec 100644 --- a/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/util/LocalImage.jvm.kt +++ b/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/util/LocalImage.jvm.kt @@ -32,19 +32,19 @@ internal actual fun __LocalImage(imageResourceName: String, modifier: Modifier, modifier = modifier, painter = painterResource(id = imageRes), contentDescription = contentDescription, - contentScale = ContentScale.FillWidth + contentScale = ContentScale.FillWidth, ) } else { Row( modifier = modifier.background(MaterialTheme.colorScheme.primary, RoundedCornerShape(Dimensions.Padding.half)), - verticalAlignment = Alignment.CenterVertically + verticalAlignment = Alignment.CenterVertically, ) { Spacer(modifier = Modifier.weight(1f)) Icon( imageVector = Icons.Default.Warning, contentDescription = contentDescription, modifier = Modifier.padding(Dimensions.Padding.half), - tint = Color.White + tint = Color.White, ) Text("Image not supported", modifier = Modifier.padding(Dimensions.Padding.default), color = Color.White) Spacer(modifier = Modifier.weight(1f)) diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/BottomNavigationView.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/BottomNavigationView.kt index ed98270f..26f177db 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/BottomNavigationView.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/BottomNavigationView.kt @@ -52,12 +52,12 @@ internal fun BottomNavigationView(viewModel: ApplicationViewModel, modifier: Mod colors = NavigationBarItemDefaults.colors( indicatorColor = MaterialTheme.colorScheme.primary, selectedIconColor = MaterialTheme.colorScheme.onPrimary, - selectedTextColor = MaterialTheme.colorScheme.primary - ) + selectedTextColor = MaterialTheme.colorScheme.primary, + ), ) } } - } + }, ) { paddingValues -> Box(modifier = Modifier.padding(bottom = paddingValues.calculateBottomPadding())) { when (selectedTab) { @@ -66,11 +66,13 @@ internal fun BottomNavigationView(viewModel: ApplicationViewModel, modifier: Mod title = "Droidcon NYC 2024", emptyText = "Sessions could not be loaded.", ) + ApplicationViewModel.Tab.MyAgenda -> SessionListView( viewModel = viewModel.agenda, title = "Agenda", emptyText = "Add sessions to your agenda from session detail in schedule.", ) + ApplicationViewModel.Tab.Venue -> VenueView() ApplicationViewModel.Tab.Sponsors -> SponsorsView(viewModel.sponsors) ApplicationViewModel.Tab.Settings -> SettingsView(viewModel.settings) diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/FeedbackDialog.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/FeedbackDialog.kt index 572c8928..c2ef5507 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/FeedbackDialog.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/FeedbackDialog.kt @@ -41,7 +41,7 @@ import co.touchlab.droidcon.viewmodel.FeedbackDialogViewModel internal fun FeedbackDialog(feedback: FeedbackDialogViewModel) { Dialog(dismiss = feedback::skipTapped) { Card( - modifier = Modifier.padding(Dimensions.Padding.double) + modifier = Modifier.padding(Dimensions.Padding.double), ) { Column( modifier = Modifier @@ -86,7 +86,7 @@ internal fun FeedbackDialog(feedback: FeedbackDialogViewModel) { placeholder = { Text( text = "(Optional) Suggest improvement", - style = MaterialTheme.typography.bodyLarge + style = MaterialTheme.typography.bodyLarge, ) }, textStyle = MaterialTheme.typography.bodyLarge, @@ -113,7 +113,7 @@ internal fun FeedbackDialog(feedback: FeedbackDialogViewModel) { TextButton(onClick = feedback::closeAndDisableTapped) { Text( text = "CLOSE AND DISABLE FEEDBACK", - color = MaterialTheme.colorScheme.primary + color = MaterialTheme.colorScheme.primary, ) } TextButton(onClick = feedback::skipTapped) { diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionBlockView.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionBlockView.kt index 3619c74a..df0dcd47 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionBlockView.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionBlockView.kt @@ -65,7 +65,7 @@ internal fun SessionBlockView(sessionsBlock: SessionBlockViewModel) { modifier = Modifier.padding(Dimensions.Padding.half), fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.onSurface, - style = MaterialTheme.typography.titleMedium + style = MaterialTheme.typography.titleMedium, ) session.room?.let { roomName -> Text( @@ -85,7 +85,7 @@ internal fun SessionBlockView(sessionsBlock: SessionBlockViewModel) { end = Dimensions.Padding.half, bottom = Dimensions.Padding.half, ), - style = MaterialTheme.typography.titleSmall + style = MaterialTheme.typography.titleSmall, ) } } diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionListView.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionListView.kt index e593e5d5..c4261e5f 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionListView.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionListView.kt @@ -71,7 +71,7 @@ internal fun SessionListView( NavigationLink(viewModel.observePresentedSessionDetail) { SessionDetailView(viewModel = it) } - } + }, ) { val scrollBehavior = TopAppBarDefaults.exitUntilCollapsedScrollBehavior(rememberTopAppBarState()) Scaffold( @@ -79,7 +79,7 @@ internal fun SessionListView( topBar = { CenterAlignedTopAppBar( title = { Text(title) }, - scrollBehavior = scrollBehavior + scrollBehavior = scrollBehavior, ) }, ) { paddingValues -> @@ -87,7 +87,7 @@ internal fun SessionListView( Column( modifier = Modifier .onSizeChanged { size = it } - .padding(top = paddingValues.calculateTopPadding()) + .padding(top = paddingValues.calculateTopPadding()), ) { val days by viewModel.observeDays.observeAsState() if (days?.isEmpty() != false) { @@ -109,16 +109,16 @@ internal fun SessionListView( indicator = { tabPositions -> if (tabPositions.indices.contains(pagerState.currentPage)) { TabIndicator( - Modifier.tabIndicatorOffset(tabPositions[pagerState.currentPage]) + Modifier.tabIndicatorOffset(tabPositions[pagerState.currentPage]), ) } else { Logger.w( "SessionList TabRow requested an indicator for selectedTabIndex: " + - "${pagerState.currentPage}, but only got ${tabPositions.count()} tabs." + "${pagerState.currentPage}, but only got ${tabPositions.count()} tabs.", ) TabRowDefaults.SecondaryIndicator() } - } + }, ) { days?.forEachIndexed { index, daySchedule -> Tab( @@ -130,7 +130,7 @@ internal fun SessionListView( pagerState.animateScrollToPage(index) } }, - unselectedContentColor = MaterialTheme.colorScheme.onSurfaceVariant + unselectedContentColor = MaterialTheme.colorScheme.onSurfaceVariant, ) { Text( text = daySchedule.day, @@ -160,7 +160,7 @@ internal fun SessionListView( ) { day.scrollState = SessionDayViewModel.ScrollState( scrollState.firstVisibleItemIndex, - scrollState.firstVisibleItemScrollOffset + scrollState.firstVisibleItemScrollOffset, ) } @@ -196,7 +196,7 @@ private fun TabIndicator(modifier: Modifier = Modifier) { .padding(horizontal = 64.dp) .height(2.dp) .clip(RoundedCornerShape(topStart = 12.dp, topEnd = 12.dp)) - .background(MaterialTheme.colorScheme.primary) + .background(MaterialTheme.colorScheme.primary), ) } diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SpeakerDetailView.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SpeakerDetailView.kt index bbdfbcab..c16ad3dd 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SpeakerDetailView.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SpeakerDetailView.kt @@ -60,7 +60,7 @@ internal fun SpeakerDetailView(viewModel: SpeakerDetailViewModel) { ) } }, - scrollBehavior = scrollBehavior + scrollBehavior = scrollBehavior, ) }, ) { paddingValues -> @@ -104,7 +104,7 @@ private fun HeaderView(name: String, tagLine: String, imageUrl: Url?) { .width(100.dp) .padding(Dimensions.Padding.default) .clip(CircleShape) - .aspectRatio(1f) + .aspectRatio(1f), ) } @@ -140,7 +140,7 @@ private fun SocialView(url: WebLink, iconName: String) { contentDescription = null, modifier = Modifier .padding(Dimensions.Padding.default) - .size(28.dp) + .size(28.dp), ) WebLinkText( text = url.link, @@ -180,7 +180,7 @@ private fun SocialView(url: WebLink, icon: ImageVector) { private fun BioView(bio: String, webLinks: List) { Row( modifier = Modifier.fillMaxWidth().padding(vertical = Dimensions.Padding.half), - verticalAlignment = Alignment.Top + verticalAlignment = Alignment.Top, ) { Icon( imageVector = Icons.Default.Description, diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/settings/SettingsView.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/settings/SettingsView.kt index dab5b8bb..df522184 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/settings/SettingsView.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/settings/SettingsView.kt @@ -44,7 +44,7 @@ internal fun SettingsView(viewModel: SettingsViewModel) { scrollBehavior = scrollBehavior, actions = { PlatformSwitchApp() - } + }, ) }, ) { paddingValues -> @@ -53,7 +53,7 @@ internal fun SettingsView(viewModel: SettingsViewModel) { modifier = Modifier .padding(top = paddingValues.calculateTopPadding()) .fillMaxHeight() - .verticalScroll(scrollState) + .verticalScroll(scrollState), ) { IconTextSwitchRow( text = "Enable feedback", diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/sponsors/SponsorDetailView.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/sponsors/SponsorDetailView.kt index 2d965cf9..8aeb4366 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/sponsors/SponsorDetailView.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/sponsors/SponsorDetailView.kt @@ -54,7 +54,7 @@ internal fun SponsorDetailView(viewModel: SponsorDetailViewModel) { NavigationLink(viewModel.observePresentedSpeakerDetail) { SpeakerDetailView(viewModel = it) } - } + }, ) { Scaffold( topBar = { @@ -67,9 +67,9 @@ internal fun SponsorDetailView(viewModel: SponsorDetailViewModel) { contentDescription = "Back", ) } - } + }, ) - } + }, ) { paddingValues -> val scrollState = rememberScrollState() Column( @@ -80,7 +80,7 @@ internal fun SponsorDetailView(viewModel: SponsorDetailViewModel) { HeaderView( name = viewModel.name, groupTitle = viewModel.groupName, - imageUrl = viewModel.imageUrl + imageUrl = viewModel.imageUrl, ) viewModel.abstract?.let { @@ -195,7 +195,7 @@ private fun RepresentativeInfoView(profile: SpeakerListItemViewModel) { .padding( start = Dimensions.Padding.default, end = Dimensions.Padding.default, - top = Dimensions.Padding.half + top = Dimensions.Padding.half, ) .clip(CircleShape) .aspectRatio(1f) @@ -211,7 +211,7 @@ private fun RepresentativeInfoView(profile: SpeakerListItemViewModel) { .padding( start = Dimensions.Padding.default, end = Dimensions.Padding.default, - top = Dimensions.Padding.half + top = Dimensions.Padding.half, ) .clip(CircleShape) .aspectRatio(1f) diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/sponsors/SponsorsView.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/sponsors/SponsorsView.kt index e3c98e2b..9147cb6d 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/sponsors/SponsorsView.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/sponsors/SponsorsView.kt @@ -58,7 +58,7 @@ internal fun SponsorsView(viewModel: SponsorListViewModel) { NavigationLink(viewModel.observePresentedSponsorDetail) { SponsorDetailView(viewModel = it) } - } + }, ) { val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior(rememberTopAppBarState()) Scaffold( @@ -66,7 +66,7 @@ internal fun SponsorsView(viewModel: SponsorListViewModel) { topBar = { TopAppBar( title = { Text("Sponsors") }, - scrollBehavior = scrollBehavior + scrollBehavior = scrollBehavior, ) }, ) { paddingValues -> @@ -99,8 +99,8 @@ private fun SponsorGroupView(sponsorGroup: SponsorGroupViewModel) { Card( modifier = Modifier.padding( vertical = Dimensions.Padding.quarter, - horizontal = Dimensions.Padding.half - ) + horizontal = Dimensions.Padding.half, + ), ) { Column(modifier = Modifier.fillMaxWidth()) { Text( diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/theme/Typography.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/theme/Typography.kt index 82ab8515..4279960a 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/theme/Typography.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/theme/Typography.kt @@ -10,64 +10,64 @@ internal object Typography { headlineLarge = TextStyle( fontFamily = montserratFontFamily, fontWeight = FontWeight.Medium, - fontSize = 32.sp + fontSize = 32.sp, ), headlineMedium = TextStyle( fontFamily = montserratFontFamily, fontWeight = FontWeight.Medium, - fontSize = 28.sp + fontSize = 28.sp, ), headlineSmall = TextStyle( fontFamily = montserratFontFamily, fontWeight = FontWeight.Medium, fontSize = 22.sp, - letterSpacing = 0.15.sp + letterSpacing = 0.15.sp, ), titleLarge = TextStyle( fontFamily = montserratFontFamily, fontWeight = FontWeight.Medium, - fontSize = 20.sp + fontSize = 20.sp, ), titleMedium = TextStyle( fontFamily = montserratFontFamily, fontWeight = FontWeight.Medium, - fontSize = 16.sp + fontSize = 16.sp, ), titleSmall = TextStyle( fontFamily = montserratFontFamily, fontWeight = FontWeight.Medium, - fontSize = 14.sp + fontSize = 14.sp, ), bodyLarge = TextStyle( fontFamily = montserratFontFamily, fontWeight = FontWeight.Medium, - fontSize = 16.sp + fontSize = 16.sp, ), bodyMedium = TextStyle( fontFamily = montserratFontFamily, fontWeight = FontWeight.Medium, - fontSize = 14.sp + fontSize = 14.sp, ), bodySmall = TextStyle( fontFamily = montserratFontFamily, fontWeight = FontWeight.Medium, - fontSize = 12.sp + fontSize = 12.sp, ), labelLarge = TextStyle( fontFamily = montserratFontFamily, fontWeight = FontWeight.SemiBold, - fontSize = 12.sp + fontSize = 12.sp, ), labelMedium = TextStyle( fontFamily = montserratFontFamily, fontWeight = FontWeight.Medium, - fontSize = 12.sp + fontSize = 12.sp, ), labelSmall = TextStyle( fontFamily = montserratFontFamily, fontWeight = FontWeight.Medium, fontSize = 10.sp, - letterSpacing = 1.5.sp - ) + letterSpacing = 1.5.sp, + ), ) } diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/util/Image.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/util/Image.kt index 117aa3cb..55db9dc4 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/util/Image.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/util/Image.kt @@ -24,7 +24,7 @@ fun DcAsyncImage( Logger.e( messageString = logTag, throwable = it.result.throwable, - tag = "AsyncImage OnError Request = ${it.result.request}\n" + tag = "AsyncImage OnError Request = ${it.result.request}\n", ) }, ) diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/venue/VenueView.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/venue/VenueView.kt index cb2b5896..475b0026 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/venue/VenueView.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/venue/VenueView.kt @@ -13,7 +13,7 @@ import org.jetbrains.compose.resources.painterResource fun VenueView() { Scaffold { paddingValues -> VenueBodyView( - modifier = Modifier.padding(paddingValues) + modifier = Modifier.padding(paddingValues), ) } } diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/util/NavigationController.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/util/NavigationController.kt index 76f94f92..b3629fd4 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/util/NavigationController.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/util/NavigationController.kt @@ -257,7 +257,7 @@ internal fun NavigationStack(key: Any?, links: NavigationStackScope.() -> Unit, constructedLinks.add( item.map { NavigationLinkWrapper(index = constructedLinks.size, value = it, reset = { item.value = null }, content) - } + }, ) } } @@ -275,7 +275,7 @@ internal fun NavigationStack(key: Any?, links: NavigationStackScope.() -> Unit, slideInHorizontally(initialOffsetX = { -it }) with slideOutHorizontally(targetOffsetX = { it }) } }, - contentAlignment = Alignment.BottomCenter + contentAlignment = Alignment.BottomCenter, ) { activeComposables -> SubcomposeLayout( measurePolicy = { constraints -> @@ -297,7 +297,7 @@ internal fun NavigationStack(key: Any?, links: NavigationStackScope.() -> Unit, it.measure(looseConstraints).place(x = 0, y = 0) } } - } + }, ) } } diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/ApplicationViewModel.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/ApplicationViewModel.kt index 392bf565..715e5111 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/ApplicationViewModel.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/ApplicationViewModel.kt @@ -40,7 +40,7 @@ class ApplicationViewModel( instanceLock.runExclusively { settingsGateway.setUseComposeForIos(newValue) } - } + }, ) var presentedFeedback: FeedbackDialogViewModel? by managed(null) @@ -69,6 +69,7 @@ class ApplicationViewModel( // We're not checking whether feedback is enabled, because the user opened a feedback notification. presentNextFeedback() } + is Notification.Local.Reminder -> { selectedTab = Tab.Schedule schedule.openSessionDetail(notification.sessionId) diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionBlockViewModel.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionBlockViewModel.kt index f97da9c5..c3e2fa9e 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionBlockViewModel.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionBlockViewModel.kt @@ -19,9 +19,9 @@ class SessionBlockViewModel( item, selected = { onScheduleItemSelected(item) - } + }, ) - } + }, ) class Factory( diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionDayViewModel.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionDayViewModel.kt index 89ed6833..d1c070b7 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionDayViewModel.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionDayViewModel.kt @@ -25,7 +25,7 @@ class SessionDayViewModel( .groupBy { it.session.startsAt.toConferenceDateTime(dateTimeService).startOfMinute } .map { (startsAt, items) -> sessionBlockFactory.create(startsAt, items, onScheduleItemSelected) - } + }, ) var scrollState: ScrollState diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionDetailViewModel.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionDetailViewModel.kt index 6d954abb..d1b9337e 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionDetailViewModel.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionDetailViewModel.kt @@ -46,7 +46,7 @@ class SessionDetailViewModel( emit(dateTimeService.now()) delay(10_000) } - } + }, ) private val observeTime by observe(::time) @@ -88,10 +88,10 @@ class SessionDetailViewModel( speaker, selected = { presentedSpeakerDetail = speakerDetailFactory.create(speaker) - } + }, ) } - } + }, ) val observeSpeakers by observe(::speakers) @@ -113,7 +113,7 @@ class SessionDetailViewModel( .map { it.isFeedbackEnabled } .combine(observeState.asFlow()) { feedbackEnabled, state -> feedbackEnabled && state == SessionState.Ended - } + }, ) val observeShowFeedbackOption by observe(::showFeedbackOption) diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionListItemViewModel.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionListItemViewModel.kt index f9b6cf8a..3f5ddd0b 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionListItemViewModel.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/session/SessionListItemViewModel.kt @@ -26,7 +26,7 @@ class SessionListItemViewModel( emit(isInPast) delay(10_000) } - } + }, ) val observeIsInPast by observe(::isInPast) diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/settings/SettingsViewModel.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/settings/SettingsViewModel.kt index 0507acaa..9e9c7a4a 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/settings/SettingsViewModel.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/settings/SettingsViewModel.kt @@ -16,7 +16,7 @@ class SettingsViewModel( instanceLock.runExclusively { settingsGateway.setFeedbackEnabled(newValue) } - } + }, ) val observeIsFeedbackEnabled by observe(::isFeedbackEnabled) @@ -28,7 +28,7 @@ class SettingsViewModel( instanceLock.runExclusively { settingsGateway.setRemindersEnabled(newValue) } - } + }, ) val observeIsRemindersEnabled by observe(::isRemindersEnabled) @@ -42,7 +42,7 @@ class SettingsViewModel( instanceLock.runExclusively { settingsGateway.setUseComposeForIos(newValue) } - } + }, ) val observeUseCompose by observe(::useCompose) diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/sponsor/SponsorDetailViewModel.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/sponsor/SponsorDetailViewModel.kt index b313f94c..334f32d9 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/sponsor/SponsorDetailViewModel.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/sponsor/SponsorDetailViewModel.kt @@ -32,7 +32,7 @@ class SponsorDetailViewModel( speaker, selected = { presentedSpeakerDetail = speakerDetailFactory.create(speaker) - } + }, ) } } diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/sponsor/SponsorGroupViewModel.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/sponsor/SponsorGroupViewModel.kt index b7740c31..1ef514cc 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/sponsor/SponsorGroupViewModel.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/sponsor/SponsorGroupViewModel.kt @@ -7,14 +7,14 @@ import org.brightify.hyperdrive.multiplatformx.BaseViewModel class SponsorGroupViewModel( sponsorGroupItemFactory: SponsorGroupItemViewModel.Factory, sponsorGroup: SponsorGroupWithSponsors, - onSponsorSelected: (Sponsor) -> Unit + onSponsorSelected: (Sponsor) -> Unit, ) : BaseViewModel() { val title = sponsorGroup.group.name val isProminent = sponsorGroup.group.isProminent val sponsors by managedList( sponsorGroup.sponsors.map { sponsor -> sponsorGroupItemFactory.create(sponsor, selected = { onSponsorSelected(sponsor) }) - } + }, ) val observeSponsors by observe(::sponsors) diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/sponsor/SponsorListViewModel.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/sponsor/SponsorListViewModel.kt index 067eda99..46e95145 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/sponsor/SponsorListViewModel.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/viewmodel/sponsor/SponsorListViewModel.kt @@ -26,10 +26,10 @@ class SponsorListViewModel( // UIApplication.sharedApplication.openURL(NSURL(string = sponsor.url.string)) presentedUrl = sponsor.url } - } + }, ) } - } + }, ) val observeSponsorGroups by observe(::sponsorGroups) diff --git a/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt b/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt index 5cf082a5..f70571d5 100644 --- a/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt +++ b/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt @@ -27,7 +27,7 @@ internal actual fun PlatformSwitchApp() { Button( onClick = { openSisterApp() - } + }, ) { Text("Open ${Constants.SisterApp.name}") } diff --git a/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/util/NavigationBackPressWrapper.kt b/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/util/NavigationBackPressWrapper.kt index 0c6649d7..1dbfb1b9 100644 --- a/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/util/NavigationBackPressWrapper.kt +++ b/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/util/NavigationBackPressWrapper.kt @@ -56,7 +56,7 @@ internal actual fun NavigationBackPressWrapper(content: @Composable () -> Unit) AnimatedVisibility( visible = dragDistance > triggerBackPressDragDistance, enter = slideInHorizontally(initialOffsetX = { -it }, animationSpec = tween(durationMillis = 100)), - exit = slideOutHorizontally(targetOffsetX = { -it }) + exit = slideOutHorizontally(targetOffsetX = { -it }), ) { Icon( imageVector = Icons.Default.KeyboardArrowLeft, diff --git a/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/util/ToSkiaImage.kt b/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/util/ToSkiaImage.kt index 3173b42e..167c79d6 100644 --- a/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/util/ToSkiaImage.kt +++ b/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/util/ToSkiaImage.kt @@ -37,8 +37,9 @@ internal fun UIImage.toSkiaImage(): Image? { val alphaType = when (alphaInfo) { CGImageAlphaInfo.kCGImageAlphaPremultipliedFirst, CGImageAlphaInfo.kCGImageAlphaPremultipliedLast -> ColorAlphaType.PREMUL CGImageAlphaInfo.kCGImageAlphaFirst, CGImageAlphaInfo.kCGImageAlphaLast -> ColorAlphaType.UNPREMUL - CGImageAlphaInfo.kCGImageAlphaNone, CGImageAlphaInfo.kCGImageAlphaNoneSkipFirst, CGImageAlphaInfo.kCGImageAlphaNoneSkipLast + CGImageAlphaInfo.kCGImageAlphaNone, CGImageAlphaInfo.kCGImageAlphaNoneSkipFirst, CGImageAlphaInfo.kCGImageAlphaNoneSkipLast, -> ColorAlphaType.OPAQUE + else -> ColorAlphaType.UNKNOWN }