新增收起应用时同时停止已读未读定时器,并在恢复后打开;解决群聊踢人后自己也看不到右上角的管理按钮问题
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
This commit is contained in:
parent
71d97f069f
commit
dd0ccb9818
@ -244,7 +244,15 @@ class Talk extends Base {
|
||||
|
||||
//群成员被移出时,需要更新群成员权限
|
||||
if ([1104, 1115].includes(record.msg_type)) {
|
||||
useDialogueStore().updateQuit()
|
||||
console.error(this.resource.extra.members, 'this.resource.extra.members')
|
||||
if (this.resource?.extra?.members?.length > 0) {
|
||||
const isMeQuit = this.resource.extra.members.find(
|
||||
(item) => item.user_id === this.getAccountId(),
|
||||
)
|
||||
if (isMeQuit) {
|
||||
useDialogueStore().updateQuit()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//群禁言变化时,需要更新群禁言状态——即更新群成员列表
|
||||
|
@ -704,7 +704,12 @@ import zu6053 from '@/static/image/chatList/zu6053@2x.png'
|
||||
import deepBubble from '@/components/deep-bubble/deep-bubble.vue'
|
||||
import { isRevoke } from './menu'
|
||||
import useConfirm from '@/components/x-confirm/useConfirm.js'
|
||||
import { onLoad as uniOnload, onUnload as uniOnUnload } from '@dcloudio/uni-app'
|
||||
import {
|
||||
onLoad as uniOnload,
|
||||
onUnload as uniOnUnload,
|
||||
onShow,
|
||||
onHide,
|
||||
} from '@dcloudio/uni-app'
|
||||
import ws from '@/connect'
|
||||
|
||||
Quill.register('formats/emoji', EmojiBlot)
|
||||
@ -807,6 +812,7 @@ const state = ref({
|
||||
currentIsUnread: 1, //当前已读未读状态
|
||||
readDetailHeight: 400, //已读未读详情高度
|
||||
isFirstEnter: true, //是否是第一次进入
|
||||
isFromHide: false, //是否从hide后恢复
|
||||
})
|
||||
|
||||
// 创建一个响应式的 Map 来维护已读数量
|
||||
@ -2382,6 +2388,40 @@ onUnmounted(() => {
|
||||
}
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
if (state.value.isFromHide) {
|
||||
if (state.value.setMessageReadInterval) {
|
||||
clearInterval(state.value.setMessageReadInterval)
|
||||
state.value.setMessageReadInterval = null
|
||||
}
|
||||
state.value.setMessageReadInterval = setInterval(() => {
|
||||
checkVisibleElements()
|
||||
}, 2000)
|
||||
|
||||
if (state.value.setOutMessageReadInterval) {
|
||||
clearInterval(state.value.setOutMessageReadInterval)
|
||||
state.value.setOutMessageReadInterval = null
|
||||
}
|
||||
state.value.setOutMessageReadInterval = setInterval(() => {
|
||||
checkVisibleOutElements()
|
||||
}, 2000)
|
||||
state.value.isFromHide = false
|
||||
}
|
||||
})
|
||||
onHide(() => {
|
||||
state.value.isFromHide = true
|
||||
if (state.value.setMessageReadInterval) {
|
||||
clearInterval(state.value.setMessageReadInterval)
|
||||
state.value.setMessageReadInterval = null
|
||||
checkVisibleElements()
|
||||
}
|
||||
if (state.value.setOutMessageReadInterval) {
|
||||
clearInterval(state.value.setOutMessageReadInterval)
|
||||
state.value.setOutMessageReadInterval = null
|
||||
checkVisibleOutElements()
|
||||
}
|
||||
})
|
||||
|
||||
// 修改防抖函数的实现
|
||||
const showMentionSelectDebounced = (quill) => {
|
||||
const text = quill.getText()
|
||||
|
Loading…
Reference in New Issue
Block a user