diff --git a/crates/notedeck/src/app.rs b/crates/notedeck/src/app.rs index f59df087..455508db 100644 --- a/crates/notedeck/src/app.rs +++ b/crates/notedeck/src/app.rs @@ -1,7 +1,7 @@ use crate::persist::{AppSizeHandler, ZoomHandler}; use crate::{ Accounts, AppContext, Args, DataPath, DataPathType, Directory, FileKeyStorage, ImageCache, - KeyStorageType, NoteCache, ThemeHandler, UnknownIds, + KeyStorageType, NoteCache, RelayDebugView, ThemeHandler, UnknownIds, }; use egui::ThemePreference; use enostr::RelayPool; @@ -84,8 +84,14 @@ impl eframe::App for Notedeck { self.zoom.try_save_zoom_factor(ctx); self.app_size.try_save_app_size(ctx); - if self.args.relay_debug && self.pool.debug.is_none() { - self.pool.use_debug(); + 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")] diff --git a/crates/notedeck/src/lib.rs b/crates/notedeck/src/lib.rs index b176a5f9..61c31fba 100644 --- a/crates/notedeck/src/lib.rs +++ b/crates/notedeck/src/lib.rs @@ -10,6 +10,7 @@ mod muted; pub mod note; mod notecache; mod persist; +pub mod relay_debug; pub mod relayspec; mod result; pub mod storage; @@ -34,6 +35,7 @@ pub use muted::{MuteFun, Muted}; pub use note::{NoteRef, RootIdError, RootNoteId, RootNoteIdBuf}; pub use notecache::{CachedNote, NoteCache}; pub use persist::*; +pub use relay_debug::RelayDebugView; pub use relayspec::RelaySpec; pub use result::Result; pub use storage::{ diff --git a/crates/notedeck_columns/src/ui/relay_debug.rs b/crates/notedeck/src/relay_debug.rs similarity index 100% rename from crates/notedeck_columns/src/ui/relay_debug.rs rename to crates/notedeck/src/relay_debug.rs diff --git a/crates/notedeck_columns/src/ui/mod.rs b/crates/notedeck_columns/src/ui/mod.rs index dc228566..5a4bb159 100644 --- a/crates/notedeck_columns/src/ui/mod.rs +++ b/crates/notedeck_columns/src/ui/mod.rs @@ -10,7 +10,6 @@ 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;