Only optimistically update unread count if success
This commit is contained in:
@@ -61,7 +61,7 @@ export function useMarkAsReadMutation() {
|
||||
if (!convoId) throw new Error('No convoId provided')
|
||||
optimisticUpdate(convoId)
|
||||
},
|
||||
onSettled(_data, _error, {convoId}) {
|
||||
onSuccess(_, {convoId}) {
|
||||
if (!convoId) return
|
||||
|
||||
queryClient.setQueryData(LIST_CONVOS_KEY, (old: ConvoListQueryData) => {
|
||||
|
||||
Reference in New Issue
Block a user