File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
integration/compose/src/main/java/com/bumptech/glide/integration/compose Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ import androidx.compose.ui.graphics.drawscope.DrawScope
12
12
import androidx.compose.ui.graphics.drawscope.clipRect
13
13
import androidx.compose.ui.graphics.drawscope.translate
14
14
import androidx.compose.ui.graphics.painter.Painter
15
+ import kotlinx.coroutines.NonCancellable
16
+ import kotlinx.coroutines.withContext
15
17
16
18
/* *
17
19
* Transition between a given request's optional placeholder and the resource.
@@ -141,7 +143,9 @@ internal class CrossFadeImpl(
141
143
animatable.animateTo(OPAQUE_ALPHA , animationSpec)
142
144
invalidate()
143
145
} finally {
144
- animatable.snapTo(OPAQUE_ALPHA )
146
+ withContext(NonCancellable ) {
147
+ animatable.snapTo(OPAQUE_ALPHA )
148
+ }
145
149
invalidate()
146
150
}
147
151
}
@@ -161,4 +165,4 @@ internal class CrossFadeImpl(
161
165
draw(size, animatable.value * alpha, colorFilter)
162
166
}
163
167
}
164
- }
168
+ }
You can’t perform that action at this time.
0 commit comments