Fix updating groups in adapter

This commit is contained in:
PavelRatushnyi 2017-09-20 13:37:29 +03:00
parent 8220891701
commit a25b282df7
2 changed files with 1 additions and 3 deletions

View file

@ -43,7 +43,6 @@ public class MapMarkersGroupsFragment extends Fragment implements OsmAndCompassL
void updateAdapter() {
if (adapter != null) {
adapter.createDisplayGroups();
adapter.notifyDataSetChanged();
}
}

View file

@ -54,8 +54,7 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter<RecyclerView.V
createDisplayGroups();
}
public void createDisplayGroups() {
items.clear();
private void createDisplayGroups() {
groups = getMapMarkersGroups();
for (int i = 0; i < groups.size(); i++) {
MapMarkersGroup group = groups.get(i);