loadMessageWithAnchor method
void
loadMessageWithAnchor(
- NIMMessage anchor
Implementation
void loadMessageWithAnchor(NIMMessage anchor) {
_logI('initFetch -->> anchor:${anchor.text}');
// Historical navigation positions the list away from the latest message.
// Keep later messages in the pending list so the user gets the new-message
// prompt instead of being scrolled away from the selected message.
prepareForAnchorLoading(visibleThrough: anchor);
hasMoreForwardMessages = true;
hasMoreNewerMessages = true;
// 历史记录返回原聊天页时,各端都需要触发动态定位。
findAnchorDate = anchor.createTime?.toInt();
unawaited(_fetchMessageListBothDirect(anchor));
}