Skip to content

Commit

Permalink
Fix initial message issue with Shiny #69
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Solymos <[email protected]>
  • Loading branch information
psolymos committed Jul 16, 2024
1 parent bf7ec4a commit 0086700
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Version 1.7-3, July 16, 2024

* Fixed initial message issue with Shiny (#69).

# Version 1.7-2, June 27, 2023

* Documented `.pb_env` environment to address WARNING after CRAN submission.
Expand Down
4 changes: 3 additions & 1 deletion R/unix/startpb.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ function(min=0, max=1)
initial = control$initial,
title = control$title, label = control$label,
width = control$gui.width))
if (doshiny())
if (doshiny()) {
pb <- shiny::Progress$new(min=min, max=max)
setpb(pb, 0)
}
} else {
pb <- NULL
}
Expand Down
4 changes: 3 additions & 1 deletion R/windows/startpb.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ function(min=0, max=1)
initial=control$initial,
title = control$title, label = control$label,
width = control$gui.width))
if (doshiny())
if (doshiny()) {
pb <- shiny::Progress$new(min=min, max=max)
setpb(pb, 0)
}
} else {
pb <- NULL
}
Expand Down

0 comments on commit 0086700

Please sign in to comment.