You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Set the current request to a promise awaiting its processing so that getCurrentRequest can be used to take some action after the current request has processed.
// When the app reconnects we do a fast "sync" of the LHN and only return chats that have new messages. We achieve this by sending the most recent reportActionID.
231
228
// we have locally. And then only update the user about chats with messages that have occurred after that reportActionID.
@@ -242,7 +239,9 @@ function reconnectApp(updateIDFrom: OnyxEntry<number> = 0) {
* A callback that's provided with all the currently serialized functions in the sequential queue.
31
+
* Should return a subset of the requests passed in that conflict with the new request.
32
+
* Any conflicting requests will be cancelled and removed from the queue.
33
+
*
34
+
* @example - In ReconnectApp, you'd only want to have one instance of that command serialized to run on reconnect. The callback for that might look like this:
* Should the requests provided to getConflictingRequests include the new request?
41
+
* This is useful if the new request and an existing request cancel eachother out completely.
42
+
*
43
+
* @example - In DeleteComment, if you're deleting an optimistic comment, you'd want to cancel the optimistic AddComment call AND the DeleteComment call.
44
+
* */
45
+
shouldIncludeCurrentRequest?: boolean;
46
+
47
+
/**
48
+
* Callback to handle a single conflicting request.
49
+
* This is useful if you need to clean up some optimistic data for a request that was queue but never sent.
50
+
* In these cases the optimisticData will be applied immediately, but the successData, failureData, and/or finallyData will never be applied unless you do it manually in this callback.
0 commit comments