notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 845f745dca985125cbceb66546f28827b5b00943
parent 3fb78ae01ebe52c83ccd23509c2d11e9b7674503
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 14 Nov 2024 10:36:16 -0800

remove NewTimelineSub

New timelines should be handled in the standard timeline codepaths

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/app.rs | 32--------------------------------
1 file changed, 0 insertions(+), 32 deletions(-)

diff --git a/src/app.rs b/src/app.rs @@ -43,7 +43,6 @@ use tracing::{debug, error, info, trace, warn}; pub enum DamusState { Initializing, Initialized, - NewTimelineSub(TimelineId), } /// We derive Deserialize/Serialize so we can persist app state on shutdown. @@ -478,33 +477,6 @@ fn update_damus(damus: &mut Damus, ctx: &egui::Context) { .expect("home subscription failed"); } - DamusState::NewTimelineSub(new_timeline_id) => { - info!("adding new timeline {}", new_timeline_id); - setup_new_nostrdb_sub( - &damus.ndb, - &mut damus.note_cache, - &mut damus.columns, - new_timeline_id, - ) - .expect("new timeline subscription failed"); - - if let Some(filter) = { - let timeline = damus - .columns - .find_timeline(new_timeline_id) - .expect("timeline"); - match &timeline.filter { - FilterState::Ready(filters) => Some(filters.clone()), - _ => None, - } - } { - let subid = Uuid::new_v4().to_string(); - damus.pool.subscribe(subid, filter); - - damus.state = DamusState::Initialized; - } - } - DamusState::Initialized => (), }; @@ -819,10 +791,6 @@ impl Damus { } } - pub fn subscribe_new_timeline(&mut self, timeline_id: TimelineId) { - self.state = DamusState::NewTimelineSub(timeline_id); - } - pub fn mock<P: AsRef<Path>>(data_path: P) -> Self { let mut columns = Columns::new(); let filter = Filter::from_json(include_str!("../queries/global.json")).unwrap();