增加按设备统计的群消息未读角标
This commit is contained in:
1 parent
f54077ce46
commit
187923ca3c
16 files changed
+189
-23
No files matched your search
@@ -35,7 +35,7 @@ const recent = ref<Record<string, string>>({})
|
||||
const conversationQuery = ref('')
|
||||
const history = ref<HTMLOListElement>()
|
||||
const shareRead = ref(false)
|
||||
const pendingVoice = ref<File>()
|
||||
const pendingFile = ref<File>()
|
||||
const view = ref<Awaited<ReturnType<typeof synchronize>>>()
|
||||
const target = computed(() => typeof route.params.user === 'string' ? route.params.user : '')
|
||||
const peer = computed(() => view.value?.peers.find((item) => item.id === selected.value))
|
||||
@@ -213,7 +213,7 @@ function attach(event: Event) {
|
||||
const input = event.target as HTMLInputElement
|
||||
const file = input.files?.[0]
|
||||
input.value = ''
|
||||
if (file) sendFile(file)
|
||||
if (file) pendingFile.value = file
|
||||
}
|
||||
|
||||
function sendFile(file: File) {
|
||||
@@ -225,12 +225,12 @@ function sendFile(file: File) {
|
||||
}
|
||||
|
||||
function sendVoice(file: File) {
|
||||
pendingVoice.value = file
|
||||
pendingFile.value = file
|
||||
}
|
||||
|
||||
watch([pendingVoice, busy], ([file, inProgress]) => {
|
||||
watch([pendingFile, busy], ([file, inProgress]) => {
|
||||
if (!file || inProgress) return
|
||||
pendingVoice.value = undefined
|
||||
pendingFile.value = undefined
|
||||
sendFile(file)
|
||||
})
|
||||
|
||||
@@ -286,7 +286,7 @@ watch(selected, () => {
|
||||
recalling.value = undefined
|
||||
forwarding.value = undefined
|
||||
forwardStatus.value = ''
|
||||
pendingVoice.value = undefined
|
||||
pendingFile.value = undefined
|
||||
draft.value = ''
|
||||
scheduleReceipt()
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user