Skip to content

Fix AsyncImage error painter not updating on uiMode config change#3426

Open
gayathrikolli11 wants to merge 1 commit into
coil-kt:mainfrom
gayathrikolli11:main
Open

Fix AsyncImage error painter not updating on uiMode config change#3426
gayathrikolli11 wants to merge 1 commit into
coil-kt:mainfrom
gayathrikolli11:main

Conversation

@gayathrikolli11

Copy link
Copy Markdown

Fixes #3245

When an activity handles uiMode config changes manually, AsyncImage doesn't update its error painter on theme switch. The issue is that AsyncImagePainter stores only the transformed state, when transform changes during recomposition there's no way to re-apply it to the previous state.

Fix: track the untransformed state separately so that when transform is updated, updateState can be re-called and pick up the correct drawable variant for the new theme.

Credit to @nishatoma for identifying the root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AsyncImage error painter does not update when switching from light/dark mode

1 participant