Skip to content

Commit

Permalink
Bump compose version.
Browse files Browse the repository at this point in the history
  • Loading branch information
kizitonwose committed Jul 6, 2024
1 parent c3c09b5 commit bb9d4e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ object Config {
}

object Versions {
val core = "2.6.0-SNAPSHOT"
val core = "2.6.0-alpha01"
val multiplatfrom = "2.6.0-alpha01"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.gestures.FlingBehavior
import androidx.compose.foundation.gestures.ScrollableDefaults
import androidx.compose.foundation.gestures.snapping.SnapLayoutInfoProvider
import androidx.compose.foundation.gestures.snapping.SnapPositionInLayout
import androidx.compose.foundation.gestures.snapping.SnapPosition
import androidx.compose.foundation.gestures.snapping.rememberSnapFlingBehavior
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.runtime.Composable
Expand All @@ -22,7 +22,7 @@ internal object CalendarDefaults {
@Composable
private fun pagedFlingBehavior(state: LazyListState): FlingBehavior {
val snappingLayout = remember(state) {
val provider = SnapLayoutInfoProvider(state, CalendarSnapPositionInLayout())
val provider = SnapLayoutInfoProvider(state, SnapPosition.Start)
CalendarSnapLayoutInfoProvider(provider)
}
return rememberSnapFlingBehavior(snappingLayout)
Expand All @@ -46,9 +46,5 @@ private fun CalendarSnapLayoutInfoProvider(
* In compose 1.3, the default was single page snapping (zero), but this changed
* in compose 1.4 to decayed page snapping which is not great for calendar usage.
*/
override fun calculateApproachOffset(initialVelocity: Float): Float = 0f
override fun calculateApproachOffset(velocity: Float, decayOffset: Float): Float = 0f
}

@OptIn(ExperimentalFoundationApi::class)
@Suppress("FunctionName")
private fun CalendarSnapPositionInLayout() = SnapPositionInLayout { _, _, _, _, _ -> 0 }
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ compose-navigation = { module = "androidx.navigation:navigation-compose", versio
compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose" }
compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "compose" }

jetbrains-compose-navigation = { module = "org.jetbrains.androidx.navigation:navigation-compose", version = "2.7.0-alpha07" }
jetbrains-compose-navigation = { module = "org.jetbrains.androidx.navigation:navigation-compose", version = "2.8.0-alpha02" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
Expand All @@ -48,4 +48,4 @@ versionCheck = { id = "com.github.ben-manes.versions", version = "0.51.0" }

# KMM
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
jetbrainsCompose = { id = "org.jetbrains.compose", version = "1.6.10" }
jetbrainsCompose = { id = "org.jetbrains.compose", version = "1.7.0-alpha01" }

0 comments on commit bb9d4e8

Please sign in to comment.