Skip to content

[Android] Update buffers if an item is removed from a ListView - #392

Merged
YGuerin merged 1 commit into
masterfrom
dev/yogu/android.listview.removing.buffers
Nov 27, 2018
Merged

YGuerin merged 1 commit into
masterfrom
dev/yogu/android.listview.removing.buffers

Conversation

@YGuerin

@YGuerin YGuerin commented Nov 27, 2018 •

Copy link
Copy Markdown
Contributor

GitHub Issue (If applicable): #

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

If an item is removed from a ListView, the two next fetched item are the same one (duplicated)

What is the new behavior?

Buffers are updated and no longer duplicate item

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Docs have been added/updated which fit documentation template. (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Updated the Release Notes
  • Associated with an issue (GitHub or internal)

Other information

Some notes provided by David Oliver recommend not to update buffers in the same cycle that all views are srapped. This is not the case here since we remove just one but if weird behavior is happenning with the ListView, try to remove this modification first.

Internal Issue (If applicable):

https://nventive.visualstudio.com/Umbrella/_workitems/edit/138117

// An INotifyCollectionChanged operation is triggering an animated update of the list.
ScrapLayout(recycler, availableBreadth);
// We actually need to update the buffer in this particular case to refresh the next item displayed.
// Since we don't scrap all views as forbidden below, we should be able to do that without weird behavior

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

define weird behaviour?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is actually not defined. If you take a look just below (20 lines further), @davidjohnoliver added a comment with this warning of weird behavior. But I have no clue what this is, we should ask him when he comes back. I didn't see anything strange from my tests.

@YGuerin
YGuerin force-pushed the dev/yogu/android.listview.removing.buffers branch from c14cd96 to 074b5e6 Compare November 27, 2018 17:33
@YGuerin
YGuerin merged commit 20cdc3e into master Nov 27, 2018
@YGuerin
YGuerin deleted the dev/yogu/android.listview.removing.buffers branch November 27, 2018 18:10
kazo0 pushed a commit to kazo0/uno that referenced this pull request Mar 6, 2026
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.

2 participants