Skip to content

SharedElements are not properly unregistered after AdapterList is disposed #1

@MaciejCiemiega

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.

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