0

I am currently dealing with customized ItemKeyedDataSource working on Messaging app. I'm facing this problem when i initialize the DataSource some times there is no data to fetch from initialize to insert! so loadafter and loadbefore will not called . but if i pass an empty list in callback.Result it should call after and before. for example : i have a messaging channel with empty messages and i want to load messages from API i will pass messageid=0 to API and because it dose not exist api will return nothing but if after called in theory it will load after 0 so there is some messages to show . is there anyway to trigger load after or load before from loadinit with empty items ? i read the document there is nothing about how to trigger that and how they will get triggerd . all i know is if new data passed from loadinit then load after and before will get called . in other cases that i have messageid related to message which will passed to Callback.result , everything works fine . is there any way around this ? did i missed some behavior of datasource that i don't know about ?

lvl4fi4
  • 1,035
  • 1
  • 8
  • 17

0 Answers0