Commit Graph
2 Commits
Author SHA1 Message Date
Artem Samoilenko 8ad7a9dcd3 [Android] Switch bookmarks to use DragReorderableRecyclerViewAdapter
Chromium change:
https://github.com/chromium/chromium/commit/2f7edb22295257d0b90c3e24f8a5f24018885a3e

Switch bookmarks to use DragReorderableRecyclerViewAdapter.
The new adapter extends SimpleRecyclerViewAdapter, bringing the
bookmarks code significantly closer to correct MVC. The SRVA invokes
all of the correct and most narrow RecyclerView.Adapter notifications,
allowing us to drop all explicit #notifyDataSetChanged calls.

There was some problems with preventing flicker on model changes, which
were overcome with #setSupportsChangeAnimations(false) and #updateOrAdd.

This is also the first use case to actually integrate with
DragReorderableRecyclerViewAdapter and some changes were needed.
* We need per-row control over draggability, not just per-type.
* Removed explicit swap impl, as ListModelBase#move is sufficient.

Bug: 1413463
2023-05-15 11:02:36 -04:00
tapanmodh d4cfc48a90 import export bookmarks android 2023-05-11 01:13:41 +05:30