notedeck

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

commit 4bdfbc640089347c4f61bf61ad7c364bd6066dd0
parent b6348b15072449cca45ca141f7e4dcdc0dbd42d3
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 10 Jul 2025 14:54:48 -0700

onboarding: restore demo deck

for some reason it was getting overwritten ?

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

Diffstat:
Mcrates/notedeck_columns/src/app.rs | 10++++------
Mcrates/notedeck_columns/src/decks.rs | 42+++++++++++++++++++++---------------------
2 files changed, 25 insertions(+), 27 deletions(-)

diff --git a/crates/notedeck_columns/src/app.rs b/crates/notedeck_columns/src/app.rs @@ -426,12 +426,10 @@ impl Damus { decks_cache } else { info!("DecksCache: creating new with demo configuration"); - let mut cache = DecksCache::new_with_demo_config(&mut timeline_cache, ctx); - for (pk, _) in &ctx.accounts.cache { - cache.add_deck_default(*pk); - } - - cache + DecksCache::new_with_demo_config(&mut timeline_cache, ctx) + //for (pk, _) in &ctx.accounts.cache { + // cache.add_deck_default(*pk); + //} }; let debug = ctx.args.debug; diff --git a/crates/notedeck_columns/src/decks.rs b/crates/notedeck_columns/src/decks.rs @@ -6,11 +6,9 @@ use notedeck::{AppContext, FALLBACK_PUBKEY}; use tracing::{error, info}; use crate::{ - accounts::AccountsRoute, column::{Column, Columns}, - route::Route, timeline::{TimelineCache, TimelineKind}, - ui::{add_column::AddColumnRoute, configure_deck::ConfigureDeckResponse}, + ui::configure_deck::ConfigureDeckResponse, }; pub enum DecksAction { @@ -333,29 +331,31 @@ pub fn demo_decks( ) -> Decks { let deck = { let mut columns = Columns::default(); - columns.add_column(Column::new(vec![ - Route::AddColumn(AddColumnRoute::Base), - Route::Accounts(AccountsRoute::Accounts), - ])); - let kind = TimelineKind::contact_list(demo_pubkey); + let timeline_kinds = [ + TimelineKind::contact_list(demo_pubkey), + TimelineKind::notifications(demo_pubkey), + ]; + let txn = Transaction::new(ctx.ndb).unwrap(); - if let Some(results) = columns.add_new_timeline_column( - timeline_cache, - &txn, - ctx.ndb, - ctx.note_cache, - ctx.pool, - &kind, - ) { - results.process( + for kind in &timeline_kinds { + if let Some(results) = columns.add_new_timeline_column( + timeline_cache, + &txn, ctx.ndb, ctx.note_cache, - &txn, - timeline_cache, - ctx.unknown_ids, - ); + ctx.pool, + kind, + ) { + results.process( + ctx.ndb, + ctx.note_cache, + &txn, + timeline_cache, + ctx.unknown_ids, + ); + } } //columns.add_new_timeline_column(Timeline::hashtag("introductions".to_string()));