Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset visual item parent on item delete request #252

Merged
merged 1 commit into from
Jun 13, 2018

Conversation

maxhora
Copy link
Contributor

@maxhora maxhora commented Jun 12, 2018

The change should resolve UI glitches, for example, on array of react-native components (issues with messages list in status-react app).
Description of issue:

  • react-native has optimization to render array of UI components. Implementation is done in function reconcileChildrenArray ( file Libraries/Renderer/ReactNativeRenderer-dev.js ). On recalculation old instances might be reused for new components instances.
  • Sometimes arrays optimization deletes multiple UI components one by one too fast and QML scene is not able to recalculate child items for the parent container from where we resolve indexes of child items to be removed. (API doesn't exist to ask parent QML item directly to remove some its child)
  • Resetting ParentItem on child to nullptr seems asks parent to remove child from children list immediately, that resolves the issue.

@maxhora maxhora merged commit 9bbbc89 into status-im:master Jun 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants