mirror of
https://github.com/rstudio/shiny.git
synced 2026-01-10 23:48:01 -05:00
Compare commits
2 Commits
v1.10.0
...
barret/deb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2acaea1444 | ||
|
|
1120cfdfd7 |
@@ -100,6 +100,7 @@ bootstrapLib <- function(theme = NULL) {
|
||||
# option is automatically reset when the app (or session) exits
|
||||
if (isRunning()) {
|
||||
setCurrentTheme(theme)
|
||||
print("is running! and registering bs_theme_dependencies_css")
|
||||
registerThemeDependency(bs_theme_dependencies_css)
|
||||
|
||||
} else {
|
||||
@@ -188,13 +189,14 @@ registerThemeDependency <- function(func) {
|
||||
|
||||
# Note that this will automatically scope to the app or session level,
|
||||
# depending on if this is called from within a session or not.
|
||||
funcs <- getShinyOption("themeDependencyFuncs")
|
||||
|
||||
funcs <- getShinyOption("themeDependencyFuncs", list())
|
||||
str(funcs)
|
||||
# Don't add func if it's already present.
|
||||
have_func <- any(vapply(funcs, identical, logical(1), func))
|
||||
if (!have_func) {
|
||||
funcs[[length(funcs) + 1]] <- func
|
||||
}
|
||||
str(funcs)
|
||||
|
||||
shinyOptions("themeDependencyFuncs" = funcs)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user