commit bdcd31cda00f942b4472748365280ec63c247a65
parent a782d01ec20d2bf2bb28382ba202aaad67f612bd
Author: kernelkind <kernelkind@gmail.com>
Date: Thu, 7 Aug 2025 17:34:14 -0400
add onboarding related state to app
Signed-off-by: kernelkind <kernelkind@gmail.com>
Diffstat:
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git 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<String>,
+
+ /// 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
@@ -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 {