From c597053db1223b6ce6d5cf595fc0281d6b015274 Mon Sep 17 00:00:00 2001 From: velichkomarija Date: Mon, 19 Oct 2020 22:59:01 +0300 Subject: [PATCH] [android] Refactor BookmarkCollectionAdapter constructor. --- .../bookmarks/BookmarkCollectionAdapter.java | 23 +++++++++---------- .../maps/bookmarks/BookmarksListFragment.java | 4 ++-- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/android/src/com/mapswithme/maps/bookmarks/BookmarkCollectionAdapter.java b/android/src/com/mapswithme/maps/bookmarks/BookmarkCollectionAdapter.java index 08deef115e..ad6fae90b0 100644 --- a/android/src/com/mapswithme/maps/bookmarks/BookmarkCollectionAdapter.java +++ b/android/src/com/mapswithme/maps/bookmarks/BookmarkCollectionAdapter.java @@ -29,9 +29,8 @@ public class BookmarkCollectionAdapter extends RecyclerView.Adapter mItemsCollection; @@ -65,7 +64,7 @@ public class BookmarkCollectionAdapter extends RecyclerView.Adapter itemsCategories, @NonNull List itemsCollection) { - mParentServerId = parentServerId; - mParentCategoryId = parentCategoryId; + mBookmarkCategory = bookmarkCategory; //noinspection AssignmentOrReturnOfFieldWithMutableType mItemsCategory = itemsCategories; //noinspection AssignmentOrReturnOfFieldWithMutableType @@ -234,7 +231,7 @@ public class BookmarkCollectionAdapter extends RecyclerView.Adapter mCategoryItems = BookmarkManager.INSTANCE.getChildrenCategories(categoryId); List mCollectionItems = BookmarkManager.INSTANCE.getChildrenCollections(categoryId); - mBookmarkCollectionAdapter = new BookmarkCollectionAdapter( - getCategoryOrThrow().getServerId(), categoryId, mCategoryItems, mCollectionItems); + mBookmarkCollectionAdapter = new BookmarkCollectionAdapter(getCategoryOrThrow(), + mCategoryItems, mCollectionItems); mBookmarkCollectionAdapter.setOnClickListener((v, item) -> { Intent intent = new Intent(getActivity(), BookmarkListActivity.class) .putExtra(BookmarksListFragment.EXTRA_CATEGORY, item);