fix: 看不到未读消息定位提醒

This commit is contained in:
kuaifan 2025-03-12 14:19:07 +08:00
parent 3e4a119f61
commit 03f140fe3b
2 changed files with 9 additions and 3 deletions

View File

@ -72,7 +72,7 @@
"vue-resize-observer": "^2.0.16",
"vue-router": "^3.6.5",
"vue-template-compiler": "~2.6.14",
"vue-virtual-scroll-list-hi": "^2.3.5-14",
"vue-virtual-scroll-list-hi": "^2.3.5-15",
"vuedraggable": "^2.24.3",
"vuex": "^3.6.2"
},

View File

@ -204,8 +204,9 @@
:disabled="scrollDisabled"
@activity="onActivity"
@scroll="onScroll"
@range="onRange"
@totop="onPrevPage"
@range="onRange"
@active-range="onActiveRange"
@on-mention="onMention"
@on-longpress="onLongpress"
@ -1524,6 +1525,7 @@ export default {
this.msgType = ''
this.searchKey = ''
this.unreadOne = 0
this.startMsgId = 0
this.scrollTail = 0
this.scrollOffset = 0
this.searchShow = false
@ -1554,6 +1556,7 @@ export default {
setTimeout(_ => {
this.onSearchMsgId()
this.positionShow = this.readTimeout === null
this.startMsgId === 0 && (this.startMsgId = data.list[data.list.length - 1]?.id || 0)
}, 100)
}).catch(_ => {
this.errorId = dialog_id
@ -3026,7 +3029,6 @@ export default {
return
}
const key = this.scrollDirection === 'down' ? 'next_id' : 'prev_id';
this.startMsgId = this.allMsgs[range.start]?.id || 0;
for (let i = range.start; i <= range.end; i++) {
if (!this.allMsgs[i]) {
continue
@ -3050,6 +3052,10 @@ export default {
}
},
onActiveRange(array) {
this.startMsgId = $A.runNum(array.length > 0 ? array[0] : 0)
},
onBack() {
if (!this.beforeBack) {
return this.handleBack();