upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/sub_commands/send.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sub_commands/send.rs')
-rw-r--r--src/sub_commands/send.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/sub_commands/send.rs b/src/sub_commands/send.rs
index 07eb343..f10d2d3 100644
--- a/src/sub_commands/send.rs
+++ b/src/sub_commands/send.rs
@@ -3,7 +3,7 @@ use std::{path::Path, str::FromStr, time::Duration};
3use anyhow::{bail, Context, Result}; 3use anyhow::{bail, Context, Result};
4use console::Style; 4use console::Style;
5use futures::future::join_all; 5use futures::future::join_all;
6use indicatif::{MultiProgress, ProgressBar, ProgressStyle}; 6use indicatif::{MultiProgress, ProgressBar, ProgressDrawTarget, ProgressStyle};
7use nostr::{ 7use nostr::{
8 nips::{ 8 nips::{
9 nip01::Coordinate, 9 nip01::Coordinate,
@@ -195,6 +195,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs, no_fetch: bool) -> Re
195 &cli_args.password, 195 &cli_args.password,
196 Some(&client), 196 Some(&client),
197 false, 197 false,
198 false,
198 ) 199 )
199 .await?; 200 .await?;
200 201
@@ -244,6 +245,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs, no_fetch: bool) -> Re
244 user_ref.relays.write(), 245 user_ref.relays.write(),
245 repo_ref.relays.clone(), 246 repo_ref.relays.clone(),
246 !cli_args.disable_cli_spinners, 247 !cli_args.disable_cli_spinners,
248 false,
247 ) 249 )
248 .await?; 250 .await?;
249 251
@@ -285,6 +287,7 @@ pub async fn send_events(
285 my_write_relays: Vec<String>, 287 my_write_relays: Vec<String>,
286 repo_read_relays: Vec<String>, 288 repo_read_relays: Vec<String>,
287 animate: bool, 289 animate: bool,
290 silent: bool,
288) -> Result<()> { 291) -> Result<()> {
289 let fallback = [ 292 let fallback = [
290 client.get_fallback_relays().clone(), 293 client.get_fallback_relays().clone(),
@@ -327,7 +330,11 @@ pub async fn send_events(
327 } 330 }
328 } 331 }
329 332
330 let m = MultiProgress::new(); 333 let m = if silent {
334 MultiProgress::with_draw_target(ProgressDrawTarget::hidden())
335 } else {
336 MultiProgress::new()
337 };
331 let pb_style = ProgressStyle::with_template(if animate { 338 let pb_style = ProgressStyle::with_template(if animate {
332 " {spinner} {prefix} {bar} {pos}/{len} {msg}" 339 " {spinner} {prefix} {bar} {pos}/{len} {msg}"
333 } else { 340 } else {