Skip to content

Commit

Permalink
Update to Compose snapshot 6745209
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbanes committed Aug 7, 2020
1 parent e76d198 commit 572722c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Expand Up @@ -51,7 +51,7 @@ object Libs {
}

object Compose {
const val snapshot = "6721902"
const val snapshot = "6745209"
const val version = "0.1.0-SNAPSHOT"

const val runtime = "androidx.compose.runtime:runtime:$version"
Expand Down
5 changes: 3 additions & 2 deletions coil/src/main/java/dev/chrisbanes/accompanist/coil/Coil.kt
Expand Up @@ -22,9 +22,10 @@ import androidx.compose.foundation.Image
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.launchInComposition
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.referentialEqualityPolicy
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.runtime.state
import androidx.compose.runtime.stateFor
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -150,7 +151,7 @@ fun CoilImage(
//
// This `callback` state enables the actor lambda to only capture the remembered state
// reference, which we can update on each composition.
val callback = state { onRequestCompleted }
val callback = remember { mutableStateOf(onRequestCompleted, referentialEqualityPolicy()) }
callback.value = onRequestCompleted

val requestActor = remember(requestKey) { CoilRequestActor(request) }
Expand Down
Expand Up @@ -17,8 +17,9 @@
package dev.chrisbanes.accompanist.coil

import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.runtime.state
import androidx.compose.ui.Modifier
import androidx.compose.ui.composed
import androidx.compose.ui.onPositioned
Expand All @@ -31,7 +32,7 @@ import androidx.compose.ui.unit.IntSize
internal fun Modifier.onSizeChanged(
onSizeChanged: (IntSize) -> Unit
) = composed {
var lastSize by state<IntSize?> { null }
var lastSize by remember { mutableStateOf<IntSize?>(null) }
onPositioned { coordinates ->
if (coordinates.size != lastSize) {
lastSize = coordinates.size
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Expand Up @@ -23,7 +23,7 @@ android.enableJetifier=true
systemProp.org.gradle.internal.publish.checksums.insecure=true

GROUP=dev.chrisbanes.accompanist
VERSION_NAME=0.1.8.ui-6721902-SNAPSHOT
VERSION_NAME=0.1.8.ui-6745209-SNAPSHOT

POM_DESCRIPTION=A collection of utilities for Jetpack Compose

Expand Down

0 comments on commit 572722c

Please sign in to comment.