Skip to content

Commit

Permalink
Use Size.isSpecified to compare size in AsyncImagePainter. (#2822)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrtwhite authored Jan 31, 2025
1 parent 5ae6212 commit 7b09b4c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.geometry.isSpecified
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.graphics.DefaultAlpha
import androidx.compose.ui.graphics.FilterQuality
Expand Down Expand Up @@ -330,7 +331,7 @@ class AsyncImagePainter internal constructor(
onBufferOverflow = DROP_OLDEST,
)
val drawSize = drawSize
if (drawSize != Size.Unspecified) {
if (drawSize.isSpecified) {
drawSizeFlow.tryEmit(drawSize)
}
this.drawSizeFlow = drawSizeFlow
Expand Down

0 comments on commit 7b09b4c

Please sign in to comment.