-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix onOutput ordering w/ Conflated Renderings Changes #876
Conversation
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.
LGTM with test.
2eb893b
to
9d70978
Compare
public final class com/squareup/workflow1/ui/container/DialogOverlayKt { | ||
public static final fun getOverlay (Landroid/app/Dialog;)Lcom/squareup/workflow1/ui/container/Overlay; | ||
public static final fun getOverlayOrNull (Landroid/app/Dialog;)Lcom/squareup/workflow1/ui/container/Overlay; | ||
} |
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.
@rjrjr What is missing in the rebase that apiDump
removed this?
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.
Oh, I never checked that the down merge was green. I think that Rick upgraded our API checker and the rules changed. This looks legit.
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.
LMK if you want this fix in a separate commit.
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.
Its fine. Will just merge.
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.
Acutally. I'll do that other apiDump
commit first.
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.
#877 for the API update.
9d70978
to
239e712
Compare
// Only null will allow us to continue processing actions and conflating stale renderings. | ||
// If this is not null, then we had an Output and we want to send it with the Rendering | ||
// (stale or not). | ||
while (actionResult == null) { |
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.
PTAL again @rjrjr as I changed the logic here such that if we ever had an Output we would emit the rendering and the Output so that we always satisfy the same constraints.
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.
Do we still need the enum? Seems like we're only checking is WorkflowOutput
at this point.
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.
Good point. Though we may go back there. I'll leave the slight YAGNI in for now.
// Only null will allow us to continue processing actions and conflating stale renderings. | ||
// If this is not null, then we had an Output and we want to send it with the Rendering | ||
// (stale or not). | ||
while (actionResult == null) { |
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.
Do we still need the enum? Seems like we're only checking is WorkflowOutput
at this point.
When adding in the option to conflate renderings, we changed the order in which the
StateFlow
of renderings was updated and theOutput
was emitted.We return now to updating the rendering
StateFlow
and then immediately callingonOutput
.