Closed fedorenkoalex closed 3 years ago
Yep it's possible. See this for an example
@fedorenkoalex much like alvindizon said, using the null check to insert the separator is the way to go.
insertSeparators(it) { before: MyItem?, after: MyItem? ->
if (before == null) {
return@insertSeparators MyHeaderItem()
}
...
}
When use Pager with
remoteMediator
, object "before" ininsertSeparators
function always not null. So there is on possible to insert divider at first place.