Skip to content

Commit

Permalink
Remove note.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrtwhite committed Dec 20, 2024
1 parent 626e75b commit 3d90e1d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions coil-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ AsyncImage(

`model` can either be the `ImageRequest.data` value - or the `ImageRequest` itself. `contentDescription` sets the text used by accessibility services to describe what this image represents.

!!! Note
If you use Compose on JVM/desktop you should import `org.jetbrains.kotlinx:kotlinx-coroutines-swing:<coroutines-version>`. Coil relies on `Dispatchers.Main.immediate` to resolve images from the memory cache synchronously and `kotlinx-coroutines-swing` provides support for that on JVM (non-Android) platforms.

## AsyncImage

`AsyncImage` is a composable that executes an image request asynchronously and renders the result. It supports the same arguments as the standard `Image` composable and additionally, it supports setting `placeholder`/`error`/`fallback` painters and `onLoading`/`onSuccess`/`onError` callbacks. Here's an example that loads an image with a circle crop, crossfade, and sets a placeholder:
Expand Down
3 changes: 0 additions & 3 deletions docs/upgrading_to_coil3.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ The `coil-compose` artifact's APIs are mostly unchanged. You can continue using
- `AsyncImagePainter`'s default `SizeResolver` no longer waits for the first `onDraw` call to get the size of the canvas. Instead, `AsyncImagePainter` defaults to `Size.ORIGINAL`.
- The Compose `modelEqualityDelegate` delegate is now set via a composition local, `LocalAsyncImageModelEqualityDelegate`, instead of as a parameter to `AsyncImage`/`SubcomposeAsyncImage`/`rememberAsyncImagePainter`.

!!! Note
If you use Coil on a JVM (non-Android) platform, you should add a dependency on a [coroutines main dispatcher](https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-main.html). On desktop you likely want to import `org.jetbrains.kotlinx:kotlinx-coroutines-swing`. If it's not imported then `ImageRequest`s won't be dispatched immediately and will have one frame of delay before setting the `ImageRequest.placeholder` or resolving from the memory cache.

## General

Other important behavior changes include:
Expand Down

0 comments on commit 3d90e1d

Please sign in to comment.