mirror of
https://gitee.com/lijingbo-2021/open-anylink-web.git
synced 2026-05-20 06:08:00 +00:00
解决bug:hasNoMoreMsg只有首次点击session有效的bug
This commit is contained in:
@@ -89,7 +89,6 @@ const msgTime = computed(() => {
|
||||
})
|
||||
|
||||
const onLoadMore = () => {
|
||||
loadMoreTips.value = ''
|
||||
emit('loadMore')
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ export const messageStore = defineStore('anyim-message', () => {
|
||||
if ('remoteRead' in obj) mySession.remoteRead = obj.remoteRead
|
||||
if ('readMsgId' in obj) mySession.readMsgId = obj.readMsgId
|
||||
if ('readTime' in obj) mySession.readTime = obj.readTime
|
||||
if ('noMoreMsg' in obj) mySession.noMoreMsg = obj.noMoreMsg
|
||||
if ('objectInfo' in obj) mySession.objectInfo = obj.objectInfo
|
||||
|
||||
if (flag) {
|
||||
|
||||
@@ -65,7 +65,9 @@ const newMsgTips = ref({
|
||||
})
|
||||
|
||||
const lastReadMsgId = ref()
|
||||
const hasNoMoreMsg = ref(false)
|
||||
const hasNoMoreMsg = computed(() => {
|
||||
return selectedSession.value.noMoreMsg || false
|
||||
})
|
||||
const isLoadMoreLoading = ref(false)
|
||||
const isLoading = ref(false)
|
||||
const isShowReturnBottom = ref(false)
|
||||
@@ -84,7 +86,6 @@ const startIndex = computed(() => {
|
||||
const reset = () => {
|
||||
capacity.value = 15
|
||||
msgListReachBottom(false)
|
||||
hasNoMoreMsg.value = false
|
||||
isLoadMoreLoading.value = false
|
||||
isLoading.value = false
|
||||
isShowReturnBottom.value = false
|
||||
@@ -312,7 +313,10 @@ const pullMsg = async (mode = 0, ref = -1) => {
|
||||
}
|
||||
|
||||
if (msgCount < pageSize) {
|
||||
hasNoMoreMsg.value = true
|
||||
messageData.updateSession({
|
||||
sessionId: selectedSessionId.value,
|
||||
noMoreMsg: true
|
||||
})
|
||||
}
|
||||
|
||||
if (mode === 0) isLoading.value = false
|
||||
|
||||
Reference in New Issue
Block a user