Skip to content

Commit

Permalink
Merge pull request #471 from qdsfdhvh/version_1.7.7
Browse files Browse the repository at this point in the history
Version 1.7.7
  • Loading branch information
qdsfdhvh authored Mar 2, 2024
2 parents 1a5ced6 + b62872c commit 4864db2
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
+ api("io.github.qdsfdhvh:image-loader:1.7.6")
+ api("io.github.qdsfdhvh:image-loader:1.7.7")
// optional - Moko Resources Decoder
+ api("io.github.qdsfdhvh:image-loader-extension-moko-resources:1.7.6")
+ api("io.github.qdsfdhvh:image-loader-extension-moko-resources:1.7.7")
// optional - Blur Interceptor (only support bitmap)
+ api("io.github.qdsfdhvh:image-loader-extension-blur:1.7.6")
+ api("io.github.qdsfdhvh:image-loader-extension-blur:1.7.7")
}
}
val jvmMain by getting {
dependencies {
// optional - ImageIO Decoder
+ api("io.github.qdsfdhvh:image-loader-extension-imageio:1.7.6")
+ api("io.github.qdsfdhvh:image-loader-extension-imageio:1.7.7")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ object ProjectVersion {
private const val monir = "7"

// backwards compatible bug fixes
private const val path = "6"
private const val path = "7"
const val version = "$major.$monir.$path"
}

Expand Down
10 changes: 5 additions & 5 deletions docs/docs/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
+ api("io.github.qdsfdhvh:image-loader:1.7.6")
+ api("io.github.qdsfdhvh:image-loader:1.7.7")
// optional - Moko Resources Decoder
+ api("io.github.qdsfdhvh:image-loader-extension-moko-resources:1.7.6")
+ api("io.github.qdsfdhvh:image-loader-extension-moko-resources:1.7.7")
// optional - Blur Interceptor (only support bitmap)
+ api("io.github.qdsfdhvh:image-loader-extension-blur:1.7.6")
+ api("io.github.qdsfdhvh:image-loader-extension-blur:1.7.7")
}
}
val jvmMain by getting {
dependencies {
// optional - ImageIO Decoder
+ api("io.github.qdsfdhvh:image-loader-extension-imageio:1.7.6")
+ api("io.github.qdsfdhvh:image-loader-extension-imageio:1.7.7")
}
}
}
Expand All @@ -38,7 +38,7 @@ Copy the following snippets if you are using [gradle version catalog](https://do

```xml title="libs.versions.toml"
[versions]
image-loader = "1.7.6"
image-loader = "1.7.7"

[libraries]
image-loader = { module = "io.github.qdsfdhvh:image-loader", version.ref = "image-loader" }
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
agp = "8.2.2"
compose-multiplatform = "1.6.0-rc02"
agp = "8.3.0"
compose-multiplatform = "1.6.0"
kotlin = "1.9.22"
kotlinx-coroutines = "1.8.0"
kotlinx-serialization = "1.6.3"
Expand All @@ -23,7 +23,7 @@ benchmark = "1.2.3"
junit = "4.13.2"
androidx-test-junit = "1.1.5"
androidx-test-espresso = "3.5.1"
androidx-test-uiautomator = "2.2.0"
androidx-test-uiautomator = "2.3.0"
profileinstaller = "1.3.1"
roborazzi = "1.10.1"
robolectric = "4.11.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import androidx.compose.ui.layout.MeasureResult
import androidx.compose.ui.layout.MeasureScope
import androidx.compose.ui.node.LayoutModifierNode
import androidx.compose.ui.node.ModifierNodeElement
import androidx.compose.ui.node.invalidateMeasurement
import androidx.compose.ui.platform.InspectorInfo
import androidx.compose.ui.unit.Constraints
import com.seiko.imageloader.ImageLoader
Expand Down Expand Up @@ -141,19 +142,26 @@ private class AutoSizeBoxNode(
onImageActionChange: (ImageAction) -> Unit,
isOnlyPostFirstEvent: Boolean,
) {
val isRequestDataChange = this.request.data != request.data

val finalRequest = modifyRequest(
request = request,
cachedSize = cachedSize,
skipEvent = isOnlyPostFirstEvent,
skipEvent = !isRequestDataChange && isOnlyPostFirstEvent,
)
val isRequestChange = this.request != finalRequest

this.request = finalRequest
this.imageLoader = imageLoader
this.onImageActionChange = onImageActionChange

if (isAttached && isRequestChange) {
launchImage()
if (isAttached) {
if (isRequestChange) {
launchImage()
}
if (isRequestDataChange) {
invalidateMeasurement()
}
}
}

Expand Down

0 comments on commit 4864db2

Please sign in to comment.