Skip to content

Recycler should defer update calls that are received while binding views #26

@steve-the-edwards

Description

@steve-the-edwards

I am getting an IllegalStateException during the adapter notifications in the launched coroutine in the update block because I had injected the Dispatchers.main.immediate CoroutineDispatcher instead of the Dispatchers.main CoroutineDispatcher so this coroutine for layout wasn't posted back to the main thread but run synchronously leading to the exception during layout.

Now, using the immediate dispatcher may be 'user error' but we could protect against it with a yield() in update()'s launch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions