Closed stevepham closed 4 years ago
Theoretically onZeroItemsLoaded
should trigger when you've reached the end, as the behavior itself is directly copied from PositionalDataSource in Room. 🤔
@Zhuinden , could you please give me advice if I implement monarchy the right way. Here is my implementation:
val realmSource = monarchy.createDataSourceFactory(....) // query realm
val dataSource = realmSource.map { } // Some mapper between entity and model
// Set some config and boundary here
val pageList = LivePagedListBuilder<Int, Model>(dataSource, PagedList.Config.Build()
monarchy.findAllPagedWithChanged(realmSource, pagedList)
// Is it correct for get paging data from realm
`
Thanks.
That sounds right, so if I find some free time I'll try to look at whether newer versions of Room implement some magic tricks to manually get an instance of a boundary callback to invoke it or something, I expected this to be handled internally within Paging though.
Hopefully looking forward you 👍 for this case
I'm sorry, I never figured out why it doesn't work. :/
So I'll close this
Does Monarchy support BoundaryCallback? I add boundary into LivePagedListBuilder but not received any trigger from them.