mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 12:02:51 +00:00
perf: 优化表情回复
This commit is contained in:
parent
53f2e07178
commit
9753dec996
@ -1907,3 +1907,5 @@ WiFi签到延迟时长为±1分钟。
|
||||
长文本
|
||||
你确定要创建任务吗?
|
||||
你确定要创建子任务吗?
|
||||
|
||||
正在处理,请稍后再试...
|
||||
|
||||
@ -57,8 +57,10 @@
|
||||
<div class="emoji-symbol no-dark-content" @click="onEmoji(item.symbol)">{{item.symbol}}</div>
|
||||
<div class="emoji-users" @click="onShowEmojiUser(item)">
|
||||
<ul>
|
||||
<template v-for="(uitem, uindex) in item.userids">
|
||||
<li v-if="uindex < emojiUsersNum" :class="{bold:uitem==userId}"><UserAvatar :userid="uitem" show-name :show-icon="false"/></li>
|
||||
<template v-for="(uitem, uindex) in sortEmojiUser(item.userids)">
|
||||
<li v-if="uindex < emojiUsersNum">
|
||||
<UserAvatar :userid="uitem" show-name :show-icon="false"/>
|
||||
</li>
|
||||
<li v-else-if="uindex == emojiUsersNum">+{{item.userids.length - emojiUsersNum}}位</li>
|
||||
</template>
|
||||
</ul>
|
||||
@ -550,6 +552,12 @@ export default {
|
||||
this.$emit("on-show-emoji-user", item)
|
||||
},
|
||||
|
||||
sortEmojiUser(useris) {
|
||||
const myList = useris.filter(item => item == this.userId);
|
||||
const otherList = useris.filter(item => item != this.userId);
|
||||
return myList.concat(otherList);
|
||||
},
|
||||
|
||||
unfoldWordChain(msg) {
|
||||
if (this.unfoldWordChainData.indexOf(msg.id) == -1) {
|
||||
const data = JSON.parse(window.localStorage.getItem('__cache:unfoldWordChain__')) || [];
|
||||
|
||||
@ -868,6 +868,7 @@ export default {
|
||||
androidKeyboardVisible: false, // Android键盘是否可见
|
||||
replyMsgAutoMention: false, // 允许回复消息后自动@
|
||||
waitUnreadData: new Map(), // 等待未读数据
|
||||
replyEmojiIngs: {}, // 是否回复表情中(避免重复回复)
|
||||
}
|
||||
},
|
||||
|
||||
@ -3725,6 +3726,12 @@ export default {
|
||||
cacheEmojis.unshift(data.symbol)
|
||||
$A.IDBSave("cacheEmojis", this.$store.state.cacheEmojis = cacheEmojis.slice(0, 3))
|
||||
//
|
||||
if (this.replyEmojiIngs[data.msg_id]) {
|
||||
$A.messageWarning("正在处理,请稍后再试...");
|
||||
return
|
||||
}
|
||||
this.replyEmojiIngs[data.msg_id] = true
|
||||
//
|
||||
this.$store.dispatch("setLoad", {
|
||||
key: `msg-${data.msg_id}`,
|
||||
delay: 600
|
||||
@ -3742,6 +3749,7 @@ export default {
|
||||
}).catch(({msg}) => {
|
||||
$A.messageError(msg);
|
||||
}).finally(_ => {
|
||||
this.replyEmojiIngs[data.msg_id] = false
|
||||
this.$store.dispatch("cancelLoad", `msg-${data.msg_id}`)
|
||||
});
|
||||
},
|
||||
|
||||
@ -1549,9 +1549,6 @@
|
||||
font-size: 12px;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
&.bold {
|
||||
font-weight: 600;
|
||||
}
|
||||
&:after {
|
||||
content: "、";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user