Commit 28d34715 by Sixong.Zhu

ids

parent 5893efae
Showing with 6 additions and 1 deletions
......@@ -513,9 +513,14 @@ export default {
if (msgs == null || msgs.length === 0) {
newMsgsArr = await dispatch(ChatStore.ACTION_GET_CHAT_MESSAGES);
} else {
const last = msgs[msgs.length - 1]
let id = last.id
if (id < 0) {
id = Math.max(...msgs.map(i => i.id))
}
newMsgsArr = await dispatch(
ChatStore.ACTION_GET_CHAT_MESSAGES_AFTER_SPECIFIC_ID,
msgs[msgs.length - 1].id
id
);
}
// const lastMsg = newMsgsArr[newMsgsArr.length - 1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment