For #13264 - Scroll to the tab above the selected tab in the tabs tray (#14372)

pull/58/head
Gabriel Luong 4 years ago committed by GitHub
parent 2f1b903005
commit dcb99856f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -543,9 +543,11 @@ class TabTrayView(
// We offset the tab index by the number of items in the other adapters.
// We add the offset, because the layoutManager is initialized with `reverseLayout`.
// We also add 1 to display the tab item above the selected browser tab.
val recyclerViewIndex = selectedBrowserTabIndex +
collectionsButtonAdapter.itemCount +
syncedTabsController.adapter.itemCount
syncedTabsController.adapter.itemCount +
1
layoutManager?.scrollToPosition(recyclerViewIndex)
}

Loading…
Cancel
Save