Skip to content

Commit 960529b

Browse files
authored
Delay setting scroll position until Recycler is ready for it (#1290)
1 parent 0dcbc5c commit 960529b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class TabSwitcherActivity : DuckDuckGoActivity(), TabSwitcherListener, Coroutine
170170

171171
private fun scrollToShowCurrentTab() {
172172
val index = tabsAdapter.adapterPositionForTab(selectedTabId)
173-
tabsRecycler.scrollToPosition(index)
173+
tabsRecycler.post { tabsRecycler.scrollToPosition(index) }
174174
}
175175

176176
private fun processCommand(command: Command?) {

0 commit comments

Comments
 (0)