diff --git a/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java b/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java index 396c1dba..8d3dcc84 100644 --- a/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java +++ b/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java @@ -94,9 +94,12 @@ public class HomeTopFragment extends Fragment { recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); lacertaLibrary.getRecentDocument(10).thenAccept(listItems -> { + if (listItems == null) { + return; + } listItemAdapter.setListItems(listItems); getActivity().runOnUiThread(() -> { - listItemAdapter.notifyItemRangeInserted(0, listItems.size()); + listItemAdapter.notifyItemRangeInserted(0, listItems.size() - 1); }); }); } diff --git a/feature/home/src/main/java/one/nem/lacerta/feature/home/ListItemAdapter.java b/feature/home/src/main/java/one/nem/lacerta/feature/home/ListItemAdapter.java index cf94a9e9..604ecf4b 100644 --- a/feature/home/src/main/java/one/nem/lacerta/feature/home/ListItemAdapter.java +++ b/feature/home/src/main/java/one/nem/lacerta/feature/home/ListItemAdapter.java @@ -54,7 +54,7 @@ public class ListItemAdapter extends RecyclerView.Adapter