diff --git a/package.json b/package.json index 99f837faf..54da29ea0 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index 7c6efefe9..ae29d1672 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -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();