แก้ไขการแสดงสถานะ "อ่านแล้ว" (support)
This commit is contained in:
parent
e6d623074d
commit
76a1d36d04
2 changed files with 9 additions and 7 deletions
|
|
@ -88,14 +88,14 @@ export const useSupportStore = defineStore("supportServiceStore", () => {
|
|||
// console.log(message.value?.result.message);
|
||||
});
|
||||
|
||||
socket.on("read", (r: SupportMessageStatus) => {
|
||||
socket.on("read", (r) => {
|
||||
if (messageStatus.value) {
|
||||
messageStatus.value.result = messageStatus.value.result.map((v) => {
|
||||
if (v.fromUserId !== r.fromUserId) return r;
|
||||
if (v.fromUserId === r.fromUserId) return r;
|
||||
return v;
|
||||
});
|
||||
// console.log("event(read):", messageStatus.value);
|
||||
}
|
||||
// console.log("event(read):", messageStatus.value);
|
||||
});
|
||||
|
||||
function scrollToEnd(position: Number = 1) {
|
||||
|
|
@ -227,7 +227,7 @@ export const useSupportStore = defineStore("supportServiceStore", () => {
|
|||
messageStatus,
|
||||
userStatus,
|
||||
currentIssue,
|
||||
currentIssueDate,
|
||||
currentIssueDate,
|
||||
currentTitle,
|
||||
fetchIssue,
|
||||
fetchIssueCategory,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue