mirror of
https://github.com/wassname/talk.git
synced 2026-08-02 13:10:23 +08:00
Fix counts not decreasing on mutations
This commit is contained in:
@@ -166,6 +166,7 @@ export default {
|
||||
updateQueries: {
|
||||
TalkAdmin_Community: prev => {
|
||||
const updated = update(prev, {
|
||||
flaggedUsernamesCount: { $apply: count => count - 1 },
|
||||
flaggedUsers: {
|
||||
nodes: { $apply: nodes => nodes.filter(node => node.id !== id) },
|
||||
},
|
||||
@@ -178,6 +179,7 @@ export default {
|
||||
updateQueries: {
|
||||
TalkAdmin_Community: prev => {
|
||||
const updated = update(prev, {
|
||||
flaggedUsernamesCount: { $apply: count => count - 1 },
|
||||
flaggedUsers: {
|
||||
nodes: {
|
||||
$apply: nodes => nodes.filter(node => node.id !== userId),
|
||||
|
||||
Reference in New Issue
Block a user