move RelayDebugView to notedeck crate and restore --relay-debug

This commit is contained in:
Ken Sedgwick
2025-02-05 12:29:55 -08:00
parent 480f98eda4
commit 091c638eb1
4 changed files with 11 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
use crate::persist::{AppSizeHandler, ZoomHandler}; use crate::persist::{AppSizeHandler, ZoomHandler};
use crate::{ use crate::{
Accounts, AppContext, Args, DataPath, DataPathType, Directory, FileKeyStorage, ImageCache, Accounts, AppContext, Args, DataPath, DataPathType, Directory, FileKeyStorage, ImageCache,
KeyStorageType, NoteCache, ThemeHandler, UnknownIds, KeyStorageType, NoteCache, RelayDebugView, ThemeHandler, UnknownIds,
}; };
use egui::ThemePreference; use egui::ThemePreference;
use enostr::RelayPool; use enostr::RelayPool;
@@ -84,8 +84,14 @@ impl eframe::App for Notedeck {
self.zoom.try_save_zoom_factor(ctx); self.zoom.try_save_zoom_factor(ctx);
self.app_size.try_save_app_size(ctx); self.app_size.try_save_app_size(ctx);
if self.args.relay_debug && self.pool.debug.is_none() { if self.args.relay_debug {
self.pool.use_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")] #[cfg(feature = "profiling")]

View File

@@ -10,6 +10,7 @@ mod muted;
pub mod note; pub mod note;
mod notecache; mod notecache;
mod persist; mod persist;
pub mod relay_debug;
pub mod relayspec; pub mod relayspec;
mod result; mod result;
pub mod storage; pub mod storage;
@@ -34,6 +35,7 @@ pub use muted::{MuteFun, Muted};
pub use note::{NoteRef, RootIdError, RootNoteId, RootNoteIdBuf}; pub use note::{NoteRef, RootIdError, RootNoteId, RootNoteIdBuf};
pub use notecache::{CachedNote, NoteCache}; pub use notecache::{CachedNote, NoteCache};
pub use persist::*; pub use persist::*;
pub use relay_debug::RelayDebugView;
pub use relayspec::RelaySpec; pub use relayspec::RelaySpec;
pub use result::Result; pub use result::Result;
pub use storage::{ pub use storage::{

View File

@@ -10,7 +10,6 @@ pub mod note;
pub mod preview; pub mod preview;
pub mod profile; pub mod profile;
pub mod relay; pub mod relay;
pub mod relay_debug;
pub mod side_panel; pub mod side_panel;
pub mod support; pub mod support;
pub mod thread; pub mod thread;