Bento icon indicating copy to clipboard operation
Bento copied to clipboard

Glitch with delete animation

Open sergdort opened this issue 5 years ago • 3 comments

Description

It seems like there is an issue with delete animation if the state of the table view changes quickly (e.g during the delete transition transition)

Proposed solution

make delete call on the component after transaction finishes

        sections[indexPath.section].items.remove(at: indexPath.row)
        CATransaction.begin()
        CATransaction.setCompletionBlock {
            component.delete()
        }
        actionPerformed?(true)
        tableView?.deleteRows(at: [indexPath], with: .left)
        CATransaction.commit()
Before After
delete_before delete

sergdort avatar Sep 13 '18 16:09 sergdort

TBH I can't see much of a difference / improvement 🤷🏼‍♀️

mluisbrown avatar Sep 13 '18 16:09 mluisbrown

@mluisbrown look at the row that is being removed

sergdort avatar Sep 13 '18 20:09 sergdort

#50 resolves common scenarios that are affected, but some edge cases are not handled.

andersio avatar Sep 14 '18 10:09 andersio