Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fea0bdc8
authored
Oct 09, 2021
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
event
parent
add19259
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
store/index.ts
store/index.ts
View file @
fea0bdc8
...
@@ -42,7 +42,7 @@ function filterMessages(
...
@@ -42,7 +42,7 @@ function filterMessages(
);
);
}
}
cons
t
removeRegisterChatEvents
:
(()
=>
void
)[]
=
[];
le
t
removeRegisterChatEvents
:
(()
=>
void
)[]
=
[];
async
function
preCacheImgs
(
msgs
:
any
[])
{
async
function
preCacheImgs
(
msgs
:
any
[])
{
await
Promise
.
all
(
await
Promise
.
all
(
...
@@ -541,18 +541,12 @@ export default {
...
@@ -541,18 +541,12 @@ export default {
}
}
state
[
ChatStore
.
STATE_FUNC_ON_NEW_MSG
](
e
);
state
[
ChatStore
.
STATE_FUNC_ON_NEW_MSG
](
e
);
};
};
if
(
chatId
==
null
)
{
if
(
!
chatId
)
{
xim
.
off
(
"msg"
,
onNewMsg
);
xim
.
off
(
"msg"
,
onNewMsg
);
xim
.
on
(
"msg"
,
onNewMsg
);
xim
.
on
(
"msg"
,
onNewMsg
);
return
;
return
;
}
}
const
onMsgRead
:
ChatNotifyListener
=
async
(
e
)
=>
{
const
onMsgRead
:
ChatNotifyListener
=
async
(
e
)
=>
{
if
(
process
.
env
.
VUE_APP_API_CLIENT_ID
!==
"teamix-fast-service-merchant"
)
{
return
;
}
if
(
chatId
!==
e
.
chat_id
)
return
;
if
(
chatId
!==
e
.
chat_id
)
return
;
const
msgs
=
state
[
ChatStore
.
STATE_CHAT_MSG_HISTORY
];
const
msgs
=
state
[
ChatStore
.
STATE_CHAT_MSG_HISTORY
];
if
(
msgs
==
null
)
return
;
if
(
msgs
==
null
)
return
;
...
@@ -655,6 +649,7 @@ export default {
...
@@ -655,6 +649,7 @@ export default {
commit
(
ChatStore
.
MUTATION_INITING_CHAT
);
commit
(
ChatStore
.
MUTATION_INITING_CHAT
);
removeRegisterChatEvents
.
forEach
((
k
)
=>
k
());
removeRegisterChatEvents
.
forEach
((
k
)
=>
k
());
removeRegisterChatEvents
=
[];
await
dispatch
(
ChatStore
.
ACTION_GET_CHAT_MEMBERS
);
await
dispatch
(
ChatStore
.
ACTION_GET_CHAT_MEMBERS
);
await
Promise
.
all
([
await
Promise
.
all
([
dispatch
(
ChatStore
.
ACTION_REGISTER_EVENT
),
dispatch
(
ChatStore
.
ACTION_REGISTER_EVENT
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment