2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] Scroll to top of logins screen after list changes

This commit is contained in:
Grigory Kruglov 2022-01-11 17:27:14 -08:00 committed by Grisha Kruglov
parent 364f558857
commit b322e4c19b

View File

@ -62,6 +62,9 @@ class SavedLoginsListView(
binding.savedLoginsList.isVisible = state.loginList.isNotEmpty()
binding.savedPasswordsEmptyView.isVisible = state.loginList.isEmpty()
}
loginsAdapter.submitList(state.filteredItems)
loginsAdapter.submitList(state.filteredItems) {
// Reset scroll position to the first item after submitted list was committed.
binding.savedLoginsList.scrollToPosition(0)
}
}
}