mirror of
https://github.com/wassname/talk.git
synced 2026-07-06 05:17:19 +08:00
Correct optimitic updates
This commit is contained in:
@@ -48,7 +48,11 @@ function commit(environment: Environment, input: CreateCommentReactionInput) {
|
||||
myActionPresence: {
|
||||
reaction: true,
|
||||
},
|
||||
actionCounts: currentCount + 1,
|
||||
actionCounts: {
|
||||
reaction: {
|
||||
total: currentCount + 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
clientMutationId: (clientMutationId++).toString(),
|
||||
},
|
||||
|
||||
@@ -42,7 +42,11 @@ function commit(environment: Environment, input: CreateCommentReactionInput) {
|
||||
myActionPresence: {
|
||||
reaction: false,
|
||||
},
|
||||
actionCounts: currentCount - 1,
|
||||
actionCounts: {
|
||||
reaction: {
|
||||
total: currentCount - 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
clientMutationId: clientMutationId.toString(),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user