diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/PasswordFragment.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.kt b/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.kt index a6c7bc67..52d3881e 100644 --- a/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.kt +++ b/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.kt @@ -123,7 +123,7 @@ class PasswordFragment : Fragment() { ) // push the category were we're going pathStack.push(item.file) - scrollPosition.push(recyclerView.verticalScrollbarPosition) + scrollPosition.push((recyclerView.layoutManager as LinearLayoutManager).findLastCompletelyVisibleItemPosition()) recyclerView.scrollToPosition(0) recyclerAdapter.clear() recyclerAdapter.addAll(getPasswords(item.file, getRepositoryDirectory(context), sortOrder)) @@ -235,7 +235,7 @@ class PasswordFragment : Fragment() { /** Goes back one level back in the path */ fun popBack() { if (passListStack.isEmpty()) return - recyclerView.scrollToPosition(scrollPosition.pop()) + (recyclerView.layoutManager as LinearLayoutManager).scrollToPosition(scrollPosition.pop()) recyclerAdapter.clear() recyclerAdapter.addAll(passListStack.pop()) pathStack.pop() |