Skip to content

Commit

Permalink
🤖 Update Dependencies (#1161)
Browse files Browse the repository at this point in the history
Updated depedencies
  • Loading branch information
mlykotom authored Jul 14, 2023
2 parents 7d488d7 + 928cf29 commit 9ceb220
Show file tree
Hide file tree
Showing 14 changed files with 148 additions and 112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fun CraneHome(
}

@OptIn(
ExperimentalMaterialApi::class, ExperimentalAnimationApi::class,
ExperimentalMaterialApi::class,
ExperimentalFoundationApi::class
)
@Composable
Expand All @@ -111,9 +111,11 @@ fun CraneHomeContent(
val suggestedDestinations by viewModel.suggestedDestinations.observeAsState()

val onPeopleChanged: (Int) -> Unit = { viewModel.updatePeople(it) }
val pagerState = rememberPagerState(initialPage = CraneScreen.Fly.ordinal)
val coroutineScope = rememberCoroutineScope()
val craneScreenValues = CraneScreen.values()
val pagerState =
rememberPagerState(initialPage = CraneScreen.Fly.ordinal) { craneScreenValues.size }

val coroutineScope = rememberCoroutineScope()
BackdropScaffold(
modifier = modifier,
scaffoldState = rememberBackdropScaffoldState(BackdropValue.Revealed),
Expand All @@ -133,19 +135,16 @@ fun CraneHomeContent(
},
backLayerContent = {
SearchContent(
widthSize,
craneScreenValues[pagerState.currentPage],
viewModel,
onPeopleChanged,
onDateSelectionClicked,
onExploreItemClicked
widthSize = widthSize,
tabSelected = craneScreenValues[pagerState.currentPage],
viewModel = viewModel,
onPeopleChanged = onPeopleChanged,
onDateSelectionClicked = onDateSelectionClicked,
onExploreItemClicked = onExploreItemClicked
)
},
frontLayerContent = {
HorizontalPager(
pageCount = craneScreenValues.size,
state = pagerState
) { page ->
HorizontalPager(state = pagerState) { page ->
when (craneScreenValues[page]) {
CraneScreen.Fly -> {
suggestedDestinations?.let { destinations ->
Expand All @@ -157,6 +156,7 @@ fun CraneHomeContent(
)
}
}

CraneScreen.Sleep -> {
ExploreSection(
widthSize = widthSize,
Expand All @@ -165,6 +165,7 @@ fun CraneHomeContent(
onItemClicked = onExploreItemClicked
)
}

CraneScreen.Eat -> {
ExploreSection(
widthSize = widthSize,
Expand Down Expand Up @@ -202,6 +203,7 @@ private fun HomeTabBar(
}

private const val TAB_SWITCH_ANIM_DURATION = 300

@OptIn(ExperimentalAnimationApi::class)
@Composable
private fun SearchContent(
Expand Down Expand Up @@ -244,6 +246,7 @@ private fun SearchContent(
onExploreItemClicked = onExploreItemClicked
)
)

CraneScreen.Sleep -> SleepSearchContent(
widthSize = widthSize,
datesSelected = selectedDates,
Expand All @@ -253,6 +256,7 @@ private fun SearchContent(
onExploreItemClicked = onExploreItemClicked
)
)

CraneScreen.Eat -> EatSearchContent(
widthSize = widthSize,
datesSelected = selectedDates,
Expand Down
20 changes: 12 additions & 8 deletions Crane/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,33 @@
#####
[versions]
accompanist = "0.30.1"
androidGradlePlugin = "8.0.1"
androidx-activity-compose = "1.7.1"
androidGradlePlugin = "8.0.2"
androidx-activity-compose = "1.7.2"
androidx-appcompat = "1.6.1"
androidx-benchmark = "1.1.0"
androidx-benchmark-junit4 = "1.1.1"
androidx-compose-bom = "2023.05.01"
androidx-compose-bom = "2023.06.01"
androidx-constraintlayout = "1.0.1"
androidx-corektx = "1.9.0"
androidx-glance = "1.0.0-beta01"
androidx-lifecycle-compose = "2.6.1"
androidx-lifecycle-runtime-compose = "2.6.1"
androidx-navigation = "2.6.0-rc01"
androidx-navigation = "2.7.0-beta02"
androidx-palette = "1.0.0"
androidx-test = "1.5.0"
androidx-test-espresso = "3.5.1"
androidx-test-ext-junit = "1.1.5"
androidx-test-ext-truth = "1.5.0"
androidx-window = "1.1.0-rc01"
androidx-window = "1.2.0-alpha03"
androidxHiltNavigationCompose = "1.0.0"
androix-test-uiautomator = "2.2.0"
coil = "2.2.2"
# @keep
compileSdk = "33"
compileSdk = "34"
compose-compiler = "1.4.0"
coroutines = "1.6.4"
coroutines = "1.7.2"
google-maps = "18.1.0"
gradle-versions = "0.46.0"
gradle-versions = "0.47.0"
hilt = "2.43.2"
hiltExt = "1.0.0"
# @pin When updating to AGP 7.4.0-alpha10 and up we can update this https://developer.android.com/studio/write/java8-support#library-desugaring-versions
Expand Down Expand Up @@ -85,6 +86,9 @@ androidx-compose-ui-util = { module = "androidx.compose.ui:ui-util" }
androidx-compose-ui-viewbinding = { module = "androidx.compose.ui:ui-viewbinding" }
androidx-constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "androidx-constraintlayout" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx-corektx" }
androidx-glance = { module = "androidx.glance:glance", version.ref = "androidx-glance" }
androidx-glance-appwidget = { module = "androidx.glance:glance-appwidget", version.ref = "androidx-glance" }
androidx-glance-material3 = { module = "androidx.glance:glance-material3", version.ref = "androidx-glance" }
androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "androidxHiltNavigationCompose" }
androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle-compose" }
androidx-lifecycle-runtime = "androidx.lifecycle:lifecycle-runtime-ktx:2.6.0-alpha04"
Expand Down
20 changes: 12 additions & 8 deletions JetLagged/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,33 @@
#####
[versions]
accompanist = "0.30.1"
androidGradlePlugin = "8.0.1"
androidx-activity-compose = "1.7.1"
androidGradlePlugin = "8.0.2"
androidx-activity-compose = "1.7.2"
androidx-appcompat = "1.6.1"
androidx-benchmark = "1.1.0"
androidx-benchmark-junit4 = "1.1.1"
androidx-compose-bom = "2023.05.01"
androidx-compose-bom = "2023.06.01"
androidx-constraintlayout = "1.0.1"
androidx-corektx = "1.9.0"
androidx-glance = "1.0.0-beta01"
androidx-lifecycle-compose = "2.6.1"
androidx-lifecycle-runtime-compose = "2.6.1"
androidx-navigation = "2.6.0-rc01"
androidx-navigation = "2.7.0-beta02"
androidx-palette = "1.0.0"
androidx-test = "1.5.0"
androidx-test-espresso = "3.5.1"
androidx-test-ext-junit = "1.1.5"
androidx-test-ext-truth = "1.5.0"
androidx-window = "1.1.0-rc01"
androidx-window = "1.2.0-alpha03"
androidxHiltNavigationCompose = "1.0.0"
androix-test-uiautomator = "2.2.0"
coil = "2.2.2"
# @keep
compileSdk = "33"
compileSdk = "34"
compose-compiler = "1.4.0"
coroutines = "1.6.4"
coroutines = "1.7.2"
google-maps = "18.1.0"
gradle-versions = "0.46.0"
gradle-versions = "0.47.0"
hilt = "2.43.2"
hiltExt = "1.0.0"
# @pin When updating to AGP 7.4.0-alpha10 and up we can update this https://developer.android.com/studio/write/java8-support#library-desugaring-versions
Expand Down Expand Up @@ -85,6 +86,9 @@ androidx-compose-ui-util = { module = "androidx.compose.ui:ui-util" }
androidx-compose-ui-viewbinding = { module = "androidx.compose.ui:ui-viewbinding" }
androidx-constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "androidx-constraintlayout" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx-corektx" }
androidx-glance = { module = "androidx.glance:glance", version.ref = "androidx-glance" }
androidx-glance-appwidget = { module = "androidx.glance:glance-appwidget", version.ref = "androidx-glance" }
androidx-glance-material3 = { module = "androidx.glance:glance-material3", version.ref = "androidx-glance" }
androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "androidxHiltNavigationCompose" }
androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle-compose" }
androidx-lifecycle-runtime = "androidx.lifecycle:lifecycle-runtime-ktx:2.6.0-alpha04"
Expand Down
16 changes: 8 additions & 8 deletions JetNews/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@
#####
[versions]
accompanist = "0.30.1"
androidGradlePlugin = "8.0.1"
androidx-activity-compose = "1.7.1"
androidGradlePlugin = "8.0.2"
androidx-activity-compose = "1.7.2"
androidx-appcompat = "1.6.1"
androidx-benchmark = "1.1.0"
androidx-benchmark-junit4 = "1.1.1"
androidx-compose-bom = "2023.05.01"
androidx-compose-bom = "2023.06.01"
androidx-constraintlayout = "1.0.1"
androidx-corektx = "1.9.0"
androidx-glance = "1.0.0-beta01"
androidx-lifecycle-compose = "2.6.1"
androidx-lifecycle-runtime-compose = "2.6.1"
androidx-navigation = "2.6.0-rc01"
androidx-navigation = "2.7.0-beta02"
androidx-palette = "1.0.0"
androidx-test = "1.5.0"
androidx-test-espresso = "3.5.1"
androidx-test-ext-junit = "1.1.5"
androidx-test-ext-truth = "1.5.0"
androidx-window = "1.1.0-rc01"
androidx-window = "1.2.0-alpha03"
androidxHiltNavigationCompose = "1.0.0"
androix-test-uiautomator = "2.2.0"
coil = "2.2.2"
# @keep
compileSdk = "33"
compileSdk = "34"
compose-compiler = "1.4.0"
coroutines = "1.6.4"
coroutines = "1.7.2"
google-maps = "18.1.0"
gradle-versions = "0.46.0"
gradle-versions = "0.47.0"
hilt = "2.43.2"
hiltExt = "1.0.0"
# @pin When updating to AGP 7.4.0-alpha10 and up we can update this https://developer.android.com/studio/write/java8-support#library-desugaring-versions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ fun HomeContent(
}

DynamicThemePrimaryColorsFromImage(dominantColorState) {
val pagerState = rememberPagerState()
val pagerState = rememberPagerState { featuredPodcasts.size }

val selectedImageUrl = featuredPodcasts.getOrNull(pagerState.currentPage)
?.podcast?.imageUrl
Expand Down Expand Up @@ -255,6 +255,7 @@ fun HomeContent(
HomeCategory.Library -> {
// TODO
}

HomeCategory.Discover -> {
Discover(
navigateToPlayer = navigateToPlayer,
Expand Down Expand Up @@ -326,7 +327,6 @@ fun FollowedPodcasts(
onPodcastUnfollowed: (String) -> Unit,
) {
HorizontalPager(
pageCount = items.size,
state = pagerState,
modifier = modifier
) { page ->
Expand Down Expand Up @@ -405,6 +405,7 @@ private fun lastUpdated(updated: OffsetDateTime): String {
val weeks = days / 7
quantityStringResource(R.plurals.updated_weeks_ago, weeks, weeks)
}

days > 0 -> quantityStringResource(R.plurals.updated_days_ago, days, days)
else -> stringResource(R.string.updated_today)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@
package com.example.jetcaster.util

import androidx.annotation.FloatRange
import androidx.compose.runtime.getValue
import androidx.compose.runtime.setValue
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Rect
import androidx.compose.ui.graphics.Brush
Expand Down Expand Up @@ -56,7 +53,6 @@ fun Modifier.verticalGradientScrim(
numStops: Int = 16
) = this then VerticalGradientElement(color, startYPercentage, endYPercentage, decay, numStops)

@OptIn(ExperimentalComposeUiApi::class)
private data class VerticalGradientElement(
var color: Color,
var startYPercentage: Float = 0f,
Expand Down Expand Up @@ -100,7 +96,7 @@ private data class VerticalGradientElement(

override fun create() = VerticalGradientModifier(createOnDraw())

override fun update(node: VerticalGradientModifier) = node.apply {
override fun update(node: VerticalGradientModifier) {
node.onDraw = createOnDraw()
}

Expand Down
20 changes: 12 additions & 8 deletions Jetcaster/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,33 @@
#####
[versions]
accompanist = "0.30.1"
androidGradlePlugin = "8.0.1"
androidx-activity-compose = "1.7.1"
androidGradlePlugin = "8.0.2"
androidx-activity-compose = "1.7.2"
androidx-appcompat = "1.6.1"
androidx-benchmark = "1.1.0"
androidx-benchmark-junit4 = "1.1.1"
androidx-compose-bom = "2023.05.01"
androidx-compose-bom = "2023.06.01"
androidx-constraintlayout = "1.0.1"
androidx-corektx = "1.9.0"
androidx-glance = "1.0.0-beta01"
androidx-lifecycle-compose = "2.6.1"
androidx-lifecycle-runtime-compose = "2.6.1"
androidx-navigation = "2.6.0-rc01"
androidx-navigation = "2.7.0-beta02"
androidx-palette = "1.0.0"
androidx-test = "1.5.0"
androidx-test-espresso = "3.5.1"
androidx-test-ext-junit = "1.1.5"
androidx-test-ext-truth = "1.5.0"
androidx-window = "1.1.0-rc01"
androidx-window = "1.2.0-alpha03"
androidxHiltNavigationCompose = "1.0.0"
androix-test-uiautomator = "2.2.0"
coil = "2.2.2"
# @keep
compileSdk = "33"
compileSdk = "34"
compose-compiler = "1.4.0"
coroutines = "1.6.4"
coroutines = "1.7.2"
google-maps = "18.1.0"
gradle-versions = "0.46.0"
gradle-versions = "0.47.0"
hilt = "2.43.2"
hiltExt = "1.0.0"
# @pin When updating to AGP 7.4.0-alpha10 and up we can update this https://developer.android.com/studio/write/java8-support#library-desugaring-versions
Expand Down Expand Up @@ -85,6 +86,9 @@ androidx-compose-ui-util = { module = "androidx.compose.ui:ui-util" }
androidx-compose-ui-viewbinding = { module = "androidx.compose.ui:ui-viewbinding" }
androidx-constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "androidx-constraintlayout" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx-corektx" }
androidx-glance = { module = "androidx.glance:glance", version.ref = "androidx-glance" }
androidx-glance-appwidget = { module = "androidx.glance:glance-appwidget", version.ref = "androidx-glance" }
androidx-glance-material3 = { module = "androidx.glance:glance-material3", version.ref = "androidx-glance" }
androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "androidxHiltNavigationCompose" }
androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle-compose" }
androidx-lifecycle-runtime = "androidx.lifecycle:lifecycle-runtime-ktx:2.6.0-alpha04"
Expand Down
Loading

0 comments on commit 9ceb220

Please sign in to comment.