From edbab37fa78c8b545deb49851b37d95c154d5742 Mon Sep 17 00:00:00 2001 From: Olivier Roy Date: Wed, 17 Jan 2024 14:32:47 -0500 Subject: [PATCH] Respect usethis.quiet. --- R/ui.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/ui.R b/R/ui.R index 460104f12..02a912227 100644 --- a/R/ui.R +++ b/R/ui.R @@ -62,20 +62,20 @@ ui_line <- function(x = character(), .envir = parent.frame()) { #' @export ui_todo <- function(x, .envir = parent.frame()) { # No longer red - cli::cli_ul(x, .envir = .envir) + if (!is_quiet()) cli::cli_ul(x, .envir = .envir) } #' @rdname ui #' @export ui_done <- function(x, .envir = parent.frame()) { - cli::cli_alert_success(paste(x, collapse = "\n\u00a0\u00a0"), .envir = .envir) + if (!is_quiet()) cli::cli_alert_success(paste(x, collapse = "\n\u00a0\u00a0"), .envir = .envir) } #' @rdname ui #' @export ui_oops <- function(x, .envir = parent.frame()) { # Adding collapse = "\n " so that the text is aligned in multiple lines. - cli::cli_alert_danger(paste(x, collapse = "\n\u00a0\u00a0"), .envir = .envir) + if (!is_quiet()) cli::cli_alert_danger(paste(x, collapse = "\n\u00a0\u00a0"), .envir = .envir) } #' @rdname ui