8000 Can't call notifyItemChanged(position) to trigger revert swipe · Issue #954 · airbnb/epoxy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Can't call notifyItemChanged(position) to trigger revert swipe #954
Closed
@semanticer

Description

@semanticer

As mentioned here https://stackoverflow.com/questions/31787272/android-recyclerview-itemtouchhelper-revert-swipe-and-restore-view-holder

probably the only way to trigger revert swipe animation is to call notifyItemChanged on your adapter directly. The problem is that this is not possible with epoxy since you get java.lang.IllegalStateException: You cannot notify item changes directly. Call requestModelBuild instead.

The issue is that requestModelBuild doesn't trigger redraw since the backing model didn't really change.

Here is the link to the exact place where I need to use notifyItemChanged but can't https://github.com/toggl/android/blob/5e0c1882ab3ebcba4c7f83486168e300653cbd59/timer/src/main/java/com/toggl/timer/log/ui/TimeEntriesLogFragment.kt#L138

Do you have some workaround for this?
Thanks

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

      0