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
1d314e61
authored
Jan 10, 2022
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' into pre
parents
b160ab72
ffceeec5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
store/index.ts
store/index.ts
View file @
1d314e61
...
@@ -35,7 +35,7 @@ function combineMessages(
...
@@ -35,7 +35,7 @@ function combineMessages(
)
{
)
{
const
set
=
new
Set
<
number
>
();
const
set
=
new
Set
<
number
>
();
const
items
:
Message
[]
=
[];
const
items
:
Message
[]
=
[];
for
(
const
item
of
[...
items1
,
...
items2
])
{
for
(
const
item
of
[...
(
items1
||
[]),
...(
items2
||
[])
])
{
if
(
item
.
chat_id
!==
chat
)
{
if
(
item
.
chat_id
!==
chat
)
{
continue
;
continue
;
}
}
...
@@ -232,8 +232,8 @@ export default {
...
@@ -232,8 +232,8 @@ export default {
);
);
const
withdraw
=
hasWithdraw
const
withdraw
=
hasWithdraw
?
newItems
?
newItems
.
filter
((
i
)
=>
i
.
type
===
MessageType
.
Withdraw
)
.
filter
((
i
)
=>
i
.
type
===
MessageType
.
Withdraw
)
.
map
((
i
)
=>
+
i
.
msg
)
.
map
((
i
)
=>
+
i
.
msg
)
:
[];
:
[];
const
filterout
=
withdraw
.
length
const
filterout
=
withdraw
.
length
?
newItems
.
filter
((
i
)
=>
!
withdraw
.
includes
(
i
.
id
))
?
newItems
.
filter
((
i
)
=>
!
withdraw
.
includes
(
i
.
id
))
...
@@ -376,7 +376,7 @@ export default {
...
@@ -376,7 +376,7 @@ export default {
state
[
ChatStore
.
STATE_CHAT_SENDING_MESSAGES
]
=
[...
current
];
state
[
ChatStore
.
STATE_CHAT_SENDING_MESSAGES
]
=
[...
current
];
}
}
},
},
[
ChatStore
.
MUTATION_SAVE_CURRENT_CHAT_INPUTING
]:
(
function
()
{
[
ChatStore
.
MUTATION_SAVE_CURRENT_CHAT_INPUTING
]:
(
function
()
{
const
setTimeoutId
:
{
[
key
:
string
]:
number
}
=
{};
const
setTimeoutId
:
{
[
key
:
string
]:
number
}
=
{};
return
(
return
(
state
:
ChatStoreState
,
state
:
ChatStoreState
,
...
@@ -993,7 +993,7 @@ export default {
...
@@ -993,7 +993,7 @@ export default {
commit
(
commit
(
ChatStore
.
MUTATION_SAVE_CURRENT_CHAT_MEMBERS
,
ChatStore
.
MUTATION_SAVE_CURRENT_CHAT_MEMBERS
,
unique
(
newChatMembers
,
function
(
item
,
all
)
{
unique
(
newChatMembers
,
function
(
item
,
all
)
{
return
all
.
findIndex
((
k
)
=>
k
.
eid
===
item
.
eid
);
return
all
.
findIndex
((
k
)
=>
k
.
eid
===
item
.
eid
);
})
})
);
);
...
@@ -1250,8 +1250,8 @@ export default {
...
@@ -1250,8 +1250,8 @@ export default {
p
.
read_count
=
option
.
all
p
.
read_count
=
option
.
all
?
p
.
total_read_count
?
p
.
total_read_count
:
option
.
readed
:
option
.
readed
?
option
.
readed
?
option
.
readed
:
p
.
read_count
+
1
;
:
p
.
read_count
+
1
;
}
}
}
}
}
else
{
}
else
{
...
@@ -1260,8 +1260,8 @@ export default {
...
@@ -1260,8 +1260,8 @@ export default {
p
.
read_count
=
option
.
all
p
.
read_count
=
option
.
all
?
p
.
total_read_count
?
p
.
total_read_count
:
option
.
readed
:
option
.
readed
?
option
.
readed
?
option
.
readed
:
p
.
read_count
+
1
;
:
p
.
read_count
+
1
;
}
}
}
}
}
}
...
...
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