Fix wrong markers group header
This commit is contained in:
parent
f5568b931b
commit
1b5e4e7a8c
2 changed files with 3 additions and 3 deletions
|
@ -144,7 +144,7 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter<RecyclerView.V
|
||||||
items.add(markerMonth);
|
items.add(markerMonth);
|
||||||
previousDateHeader = markerMonth;
|
previousDateHeader = markerMonth;
|
||||||
monthsDisplayed += 1;
|
monthsDisplayed += 1;
|
||||||
} else if (currentMonth - markerMonth >= 4 && previousDateHeader != THIS_YEAR_HEADER) {
|
} else if (currentMonth - markerMonth >= 4 && previousDateHeader != markerMonth && previousDateHeader != THIS_YEAR_HEADER) {
|
||||||
items.add(THIS_YEAR_HEADER);
|
items.add(THIS_YEAR_HEADER);
|
||||||
previousDateHeader = THIS_YEAR_HEADER;
|
previousDateHeader = THIS_YEAR_HEADER;
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,8 +80,8 @@ public class MapMarkersHistoryAdapter extends RecyclerView.Adapter<RecyclerView.
|
||||||
} else if (currentDay - markerDay > 8 && monthsDisplayed < 3 && previousHeader != markerMonth) {
|
} else if (currentDay - markerDay > 8 && monthsDisplayed < 3 && previousHeader != markerMonth) {
|
||||||
items.add(markerMonth);
|
items.add(markerMonth);
|
||||||
previousHeader = markerMonth;
|
previousHeader = markerMonth;
|
||||||
monthsDisplayed += 1;
|
monthsDisplayed++;
|
||||||
} else if (currentMonth - markerMonth >= 4 && previousHeader != THIS_YEAR_HEADER) {
|
} else if (currentMonth - markerMonth >= 4 && previousHeader != markerMonth && previousHeader != THIS_YEAR_HEADER) {
|
||||||
items.add(THIS_YEAR_HEADER);
|
items.add(THIS_YEAR_HEADER);
|
||||||
previousHeader = THIS_YEAR_HEADER;
|
previousHeader = THIS_YEAR_HEADER;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue