mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/13264 - Scroll to the tab above the selected tab in the tabs tray (https://github.com/mozilla-mobile/fenix/pull/14372)
This commit is contained in:
parent
f282aa4327
commit
5e1f5a2364
@ -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…
Reference in New Issue
Block a user