Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct? Based on the issue I just read it seems like
didLoadPersistedRequests
should be preventing this callback from executing - but does not because we are callingOnyx.set()
before updating that variable. LMK if I've got it wrong. Probably we should...didLoadPersistedRequests
above theOnyx.set()
in this function to solve the issue for nowkeysChanged()
is async (what we have before) to prevent other potential issues where we have assumed an asynchronous callbackThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that solution also works, but is there a reason why we would want to continue running if have an empty array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still happy to switch to just do the other change though. That way we'll have close to original behavior as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I can't really think of one. But it's not the issue we are trying to fix here and doesn't seem to be causing any specific problem for us.