Merge relay debug view fixes & more strict args #711

Ken Sedgwick (5):
      drive-by compiler warning fixes
      drive-by clippy fixes
      add derive Debug to some things
      panic on unknown CLI arguments
      move RelayDebugView to notedeck crate and restore --relay-debug

William Casarin (4):
      clippy: fix lint
      args: skip creation of vec
      nix: fix android build

Link: https://github.com/damus-io/notedeck/pull/711
This commit is contained in:
William Casarin
2025-02-10 17:03:18 -08:00
13 changed files with 129 additions and 17 deletions

View File

@@ -22,7 +22,7 @@ use egui_extras::{Size, StripBuilder};
use nostrdb::{Ndb, Transaction};
use std::collections::HashMap;
use std::collections::{BTreeSet, HashMap};
use std::path::Path;
use std::time::Duration;
use tracing::{debug, error, info, trace, warn};
@@ -51,6 +51,8 @@ pub struct Damus {
pub debug: bool,
pub since_optimize: bool,
pub textmode: bool,
pub unrecognized_args: BTreeSet<String>,
}
fn handle_key_events(input: &egui::InputState, columns: &mut Columns) {
@@ -358,7 +360,7 @@ impl Damus {
pub fn new(ctx: &mut AppContext<'_>, args: &[String]) -> Self {
// arg parsing
let parsed_args = ColumnsArgs::parse(
let (parsed_args, unrecognized_args) = ColumnsArgs::parse(
args,
ctx.accounts
.get_selected_account()
@@ -434,6 +436,7 @@ impl Damus {
support,
decks_cache,
debug,
unrecognized_args,
}
}
@@ -476,12 +479,17 @@ impl Damus {
view_state: ViewState::default(),
support,
decks_cache,
unrecognized_args: BTreeSet::default(),
}
}
pub fn subscriptions(&mut self) -> &mut HashMap<String, SubKind> {
&mut self.subscriptions.subs
}
pub fn unrecognized_args(&self) -> &BTreeSet<String> {
&self.unrecognized_args
}
}
/*