mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-18 09:04:21 +01:00
add onboarding related state to app
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
@@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user