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-symbol no-dark-content" @click="onEmoji(item.symbol)">{{item.symbol}}</div>
|
||||||
<div class="emoji-users" @click="onShowEmojiUser(item)">
|
<div class="emoji-users" @click="onShowEmojiUser(item)">
|
||||||
<ul>
|
<ul>
|
||||||
<template v-for="(uitem, uindex) in item.userids">
|
<template v-for="(uitem, uindex) in sortEmojiUser(item.userids)">
|
||||||
<li v-if="uindex < emojiUsersNum" :class="{bold:uitem==userId}"><UserAvatar :userid="uitem" show-name :show-icon="false"/></li>
|
<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>
|
<li v-else-if="uindex == emojiUsersNum">+{{item.userids.length - emojiUsersNum}}位</li>
|
||||||
</template>
|
</template>
|
||||||
</ul>
|
</ul>
|
||||||
@ -550,6 +552,12 @@ export default {
|
|||||||
this.$emit("on-show-emoji-user", item)
|
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) {
|
unfoldWordChain(msg) {
|
||||||
if (this.unfoldWordChainData.indexOf(msg.id) == -1) {
|
if (this.unfoldWordChainData.indexOf(msg.id) == -1) {
|
||||||
const data = JSON.parse(window.localStorage.getItem('__cache:unfoldWordChain__')) || [];
|
const data = JSON.parse(window.localStorage.getItem('__cache:unfoldWordChain__')) || [];
|
||||||
|
|||||||
@ -868,6 +868,7 @@ export default {
|
|||||||
androidKeyboardVisible: false, // Android键盘是否可见
|
androidKeyboardVisible: false, // Android键盘是否可见
|
||||||
replyMsgAutoMention: false, // 允许回复消息后自动@
|
replyMsgAutoMention: false, // 允许回复消息后自动@
|
||||||
waitUnreadData: new Map(), // 等待未读数据
|
waitUnreadData: new Map(), // 等待未读数据
|
||||||
|
replyEmojiIngs: {}, // 是否回复表情中(避免重复回复)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -3725,6 +3726,12 @@ export default {
|
|||||||
cacheEmojis.unshift(data.symbol)
|
cacheEmojis.unshift(data.symbol)
|
||||||
$A.IDBSave("cacheEmojis", this.$store.state.cacheEmojis = cacheEmojis.slice(0, 3))
|
$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", {
|
this.$store.dispatch("setLoad", {
|
||||||
key: `msg-${data.msg_id}`,
|
key: `msg-${data.msg_id}`,
|
||||||
delay: 600
|
delay: 600
|
||||||
@ -3742,6 +3749,7 @@ export default {
|
|||||||
}).catch(({msg}) => {
|
}).catch(({msg}) => {
|
||||||
$A.messageError(msg);
|
$A.messageError(msg);
|
||||||
}).finally(_ => {
|
}).finally(_ => {
|
||||||
|
this.replyEmojiIngs[data.msg_id] = false
|
||||||
this.$store.dispatch("cancelLoad", `msg-${data.msg_id}`)
|
this.$store.dispatch("cancelLoad", `msg-${data.msg_id}`)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1549,9 +1549,6 @@
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
&.bold {
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
&:after {
|
&:after {
|
||||||
content: "、";
|
content: "、";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user