From efa0bfcca1bbe337dfe6ed3b65a7a5f8c53970d6 Mon Sep 17 00:00:00 2001 From: kernelkind Date: Wed, 1 Jan 2025 15:47:40 -0500 Subject: [PATCH] integrate RelayDebugView Signed-off-by: kernelkind --- crates/notedeck_chrome/src/app.rs | 11 +++++++++++ crates/notedeck_columns/src/ui/mod.rs | 1 + 2 files changed, 12 insertions(+) diff --git a/crates/notedeck_chrome/src/app.rs b/crates/notedeck_chrome/src/app.rs index 6e4c62c4..0210bd0b 100644 --- a/crates/notedeck_chrome/src/app.rs +++ b/crates/notedeck_chrome/src/app.rs @@ -7,6 +7,7 @@ use notedeck::{ use enostr::RelayPool; use nostrdb::{Config, Ndb, Transaction}; +use notedeck_columns::ui::relay_debug::RelayDebugView; use std::cell::RefCell; use std::path::Path; use std::rc::Rc; @@ -80,6 +81,16 @@ impl eframe::App for Notedeck { self.app_rect_handler.try_save_app_size(ctx); + if self.args.relay_debug { + if self.pool.debug.is_none() { + self.pool.use_debug(); + } + + if let Some(debug) = &mut self.pool.debug { + RelayDebugView::window(ctx, debug); + } + } + #[cfg(feature = "profiling")] puffin_egui::profiler_window(ctx); } diff --git a/crates/notedeck_columns/src/ui/mod.rs b/crates/notedeck_columns/src/ui/mod.rs index 5a4bb159..dc228566 100644 --- a/crates/notedeck_columns/src/ui/mod.rs +++ b/crates/notedeck_columns/src/ui/mod.rs @@ -10,6 +10,7 @@ pub mod note; pub mod preview; pub mod profile; pub mod relay; +pub mod relay_debug; pub mod side_panel; pub mod support; pub mod thread;