fetchMessageRemoteNewer method
dynamic
fetchMessageRemoteNewer(
- NIMMessage anchor
Implementation
fetchMessageRemoteNewer(NIMMessage anchor) {
_logI('fetch remote newer anchor time:${anchor.timestamp}');
ChatMessageRepo.fetchHistoryMessage(
anchor,
DateTime.now().millisecondsSinceEpoch,
messageLimit,
QueryDirection.QUERY_NEW)
.then((value) {
if (value.isSuccess) {
// no need to update credible time, because all messages behind this
_onListFetchSuccess(value.data, QueryDirection.QUERY_NEW);
} else {
_onListFetchFailed(value.code, value.errorDetails);
}
});
}