@@ -733,7 +733,6 @@ export default {
positionLoad: 0, // 定位跳转加载中
firstMsgLength: 0, // 首次加载消息数量
isFirstShowTag: false, // 是否首次显示标签
- positionStatus: false, // 定位跳转状态
msgPreparedStatus: false, // 消息准备完成
listPreparedStatus: false, // 消息准备完成
selectedTextStatus: false, // 是否选择文本
@@ -1091,7 +1090,6 @@ export default {
this.searchShow = false
this.unreadMsgId = 0
this.firstMsgLength = this.allMsgList.length || 1
- this.positionStatus = false
this.listPreparedStatus = false
this.scrollToBottomAndRefresh = false
//
@@ -1341,12 +1339,6 @@ export default {
}
}
},
-
- readEnabled(val) {
- if (!this.positionStatus && val) {
- this.positionStatus = true
- }
- },
},
methods: {
diff --git a/resources/assets/js/store/actions.js b/resources/assets/js/store/actions.js
index 56a1a36c0..e9d8f924d 100644
--- a/resources/assets/js/store/actions.js
+++ b/resources/assets/js/store/actions.js
@@ -2767,23 +2767,12 @@ export default {
dispatch("saveDialogMsg", msg)
});
} else if ($A.isJson(data)) {
- let delay = false
- if (typeof data.__delay__ !== "undefined") {
- delete data.__delay__
- delay = true
- }
const index = state.dialogMsgs.findIndex(({id}) => id == data.id);
data = Object.assign({}, state.dialogMsgs[index], data)
if (index > -1) {
state.dialogMsgs.splice(index, 1, data);
} else {
- if (delay) {
- setTimeout(_ => {
- state.dialogMsgs.push(data);
- }, 100)
- } else {
- state.dialogMsgs.push(data);
- }
+ state.dialogMsgs.push(data);
}
$A.IDBSave("dialogMsgs", state.dialogMsgs, 600)
//
@@ -3317,16 +3306,25 @@ export default {
Store.set('dialogMsgPush', data);
}
}
- // 更新消息列表
- dispatch("saveDialogMsg", Object.assign(data, {__delay__: true}))
- // 更新最后消息
- dispatch("updateDialogLastMsg", data);
+ const saveMsg = (data, count) => {
+ if (count > 5 || state.dialogMsgs.find(({id}) => id == data.id)) {
+ // 更新消息列表
+ dispatch("saveDialogMsg", data)
+ // 更新最后消息
+ dispatch("updateDialogLastMsg", data);
+ return;
+ }
+ setTimeout(_ => {
+ saveMsg(data, ++count)
+ }, 20);
+ }
+ saveMsg(data, 0);
break;
case 'update':
case 'readed':
const updateMsg = (data, count) => {
if (state.dialogMsgs.find(({id}) => id == data.id)) {
- dispatch("saveDialogMsg", Object.assign(data, {__delay__: true}))
+ dispatch("saveDialogMsg", data)
// 更新待办
if (typeof data.todo !== "undefined") {
dispatch("getDialogTodo", dialog_id)
diff --git a/resources/assets/sass/dark.scss b/resources/assets/sass/dark.scss
index 77cc6d13c..0b4ca7910 100644
--- a/resources/assets/sass/dark.scss
+++ b/resources/assets/sass/dark.scss
@@ -499,10 +499,6 @@ body.dark-mode-reverse {
color: #333;
}
}
-
- .mention {
- color: #333;
- }
}
}
diff --git a/resources/assets/sass/pages/components/dialog-wrapper.scss b/resources/assets/sass/pages/components/dialog-wrapper.scss
index 1b2e1333c..e855a5613 100644
--- a/resources/assets/sass/pages/components/dialog-wrapper.scss
+++ b/resources/assets/sass/pages/components/dialog-wrapper.scss
@@ -1449,7 +1449,7 @@
opacity: 0;
transform: translateX(100%);
animation: position-in-animation 200ms ease-out forwards;
- animation-delay: 300ms;
+ animation-delay: 600ms;
.position-label {
display: flex;