forked from organicmaps/organicmaps
[android] Fixes after review.
This commit is contained in:
parent
ff7c0da926
commit
97145d97e2
3 changed files with 4 additions and 6 deletions
|
@ -146,9 +146,9 @@ public class BookmarksListFragment extends BaseMwmRecyclerFragment<BookmarkListA
|
|||
|
||||
mBookmarkCollectionAdapter = new BookmarkCollectionAdapter(mCategoryItems, mCollectionItems);
|
||||
mBookmarkCollectionAdapter.setOnClickListener((v, item) -> {
|
||||
Intent intent = new Intent(getActivity(), BookmarkListActivity.class)
|
||||
Intent intent = new Intent(getActivity(), BookmarkListActivity.class)
|
||||
.putExtra(BookmarksListFragment.EXTRA_CATEGORY, item);
|
||||
startActivityForResult(intent, 101);
|
||||
startActivity(intent);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -143,8 +143,8 @@ public class Holders
|
|||
void setOnClickListener(@Nullable OnItemClickListener<BookmarkCategory> listener)
|
||||
{
|
||||
mView.setOnClickListener(v -> {
|
||||
if (listener != null)
|
||||
listener.onItemClick(v,mEntity);
|
||||
if (listener != null && mEntity != null)
|
||||
listener.onItemClick(v, mEntity);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -31,8 +31,6 @@ public class CategoryDataSource extends RecyclerView.AdapterDataObserver impleme
|
|||
BookmarkManager.INSTANCE.getCategoriesSnapshot(mCategory.getType().getFilterStrategy());
|
||||
int index = snapshot.indexOfOrInvalidIndex(mCategory);
|
||||
if (index >= 0)
|
||||
{
|
||||
mCategory = snapshot.getItems().get(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue