-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Bookmarking fixes #1281
Bookmarking fixes #1281
Conversation
|
||
if (length(private$progressKeys) == 0 |
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.
Previously, the check for private$progressKeys
didn't quite have the right logic, I believe. If there was anything in private$progressKeys
, all of the subsequent code in this function would run, including sending a message that didn't contain anything from private$progressKeys
:
private$sendMessage(
errors = as.list(errors),
values = as.list(values),
inputMessages = inputMessages
)
I think that instead, private$progressKeys
should just get reset every time this function is called. (That's how I've implemented it, below.)
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.
The original code was correct. The existence of progress keys means we need to send a values
message (even if empty) as this has a side effect of clearing out progress indication on the client. See the other note I added.
This should be good to merge now. |
@@ -1552,17 +1568,37 @@ outputOptions <- function(x, name, ...) { | |||
#' | |||
#' @export | |||
onFlush <- function(fun, once = TRUE, session = getDefaultReactiveDomain()) { | |||
session$onFlush(fun) | |||
session$onFlush(fun, once = once) |
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.
Heh, good catch
Other than those progress-related fixes that need to be made, this looks good. Let me review one more time after you fix those. |
OK, I've restored the original logic for |
This closes #1273.