more emoji react inconsistency handling
This commit is contained in:
parent
22a04b2feb
commit
700be4b08f
1 changed files with 3 additions and 0 deletions
|
|
@ -403,6 +403,7 @@ export const useStatusesStore = defineStore('statuses', {
|
||||||
name: emoji,
|
name: emoji,
|
||||||
count: 0,
|
count: 0,
|
||||||
accounts: [],
|
accounts: [],
|
||||||
|
account_ids: [],
|
||||||
}
|
}
|
||||||
|
|
||||||
const count = value ? reaction.count + 1 : reaction.count - 1
|
const count = value ? reaction.count + 1 : reaction.count - 1
|
||||||
|
|
@ -410,12 +411,14 @@ export const useStatusesStore = defineStore('statuses', {
|
||||||
const accounts = value
|
const accounts = value
|
||||||
? [...reaction.accounts, currentUser]
|
? [...reaction.accounts, currentUser]
|
||||||
: reaction.accounts.filter((acc) => acc.id !== currentUser.id)
|
: reaction.accounts.filter((acc) => acc.id !== currentUser.id)
|
||||||
|
const account_ids = accounts.map(({ id }) => id)
|
||||||
|
|
||||||
const newReaction = {
|
const newReaction = {
|
||||||
...reaction,
|
...reaction,
|
||||||
count,
|
count,
|
||||||
me: value,
|
me: value,
|
||||||
accounts,
|
accounts,
|
||||||
|
account_ids,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reactionPresent && count > 0) {
|
if (reactionPresent && count > 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue