Skip to content

SharedElements are not properly unregistered after AdapterList is disposed #1

Description

@MaciejCiemiega

Causes issues in the following scenario:

  1. On first screen there is an AdapterList component with FROM element.
  2. User navigates to next screen, that has no SharedElement.
  3. User navigates to next screen that has a TO element.

Here the transition between FROM and TO would start because we still remember that FROM element from first screen. This is due to a bug in Compose that cause AdapterList to never invoke onDispose on list items, so FROM element would never know it disappeared.

https://issuetracker.google.com/issues/150174792
I'm not sure if any workaround can be implemented before it's fixed.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions