diff --git a/crates/notedeck_columns/src/app.rs b/crates/notedeck_columns/src/app.rs index 34f1832..53f5cd2 100644 --- a/crates/notedeck_columns/src/app.rs +++ b/crates/notedeck_columns/src/app.rs @@ -4,6 +4,7 @@ use crate::{ decks::{Decks, DecksCache}, draft::Drafts, nav::{self, ProcessNavResult}, + onboarding::Onboarding, options::AppOptions, route::Route, storage, @@ -58,6 +59,9 @@ pub struct Damus { pub note_options: NoteOptions, pub unrecognized_args: BTreeSet, + + /// keep track of follow packs + pub onboarding: Onboarding, } fn handle_key_events(input: &egui::InputState, columns: &mut Columns) { @@ -169,6 +173,10 @@ fn try_process_event( } } + if let Some(follow_packs) = damus.onboarding.get_follow_packs_mut() { + follow_packs.poll_for_notes(app_ctx.ndb, app_ctx.unknown_ids); + } + if app_ctx.unknown_ids.ready_to_send() { unknown_id_send(app_ctx.unknown_ids, app_ctx.pool); } @@ -517,6 +525,7 @@ impl Damus { unrecognized_args, jobs, threads, + onboarding: Onboarding::default(), } } @@ -567,6 +576,7 @@ impl Damus { unrecognized_args: BTreeSet::default(), jobs: JobsCache::default(), threads: Threads::default(), + onboarding: Onboarding::default(), } } diff --git a/crates/notedeck_columns/src/view_state.rs b/crates/notedeck_columns/src/view_state.rs index 756d04f..246b4a3 100644 --- a/crates/notedeck_columns/src/view_state.rs +++ b/crates/notedeck_columns/src/view_state.rs @@ -1,6 +1,7 @@ use std::collections::HashMap; use enostr::Pubkey; +use notedeck_ui::nip51_set::Nip51SetUiCache; use crate::deck_state::DeckState; use crate::login_manager::AcquireKeyState; @@ -25,6 +26,9 @@ pub struct ViewState { /// fullscreen media viewier, as well as any other state we want to /// keep track of pub media_viewer: MediaViewerState, + + /// Keep track of checkbox state of follow pack onboarding + pub follow_packs: Nip51SetUiCache, } impl ViewState {