onboarding: restore demo deck
for some reason it was getting overwritten ? Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -426,12 +426,10 @@ impl Damus {
|
|||||||
decks_cache
|
decks_cache
|
||||||
} else {
|
} else {
|
||||||
info!("DecksCache: creating new with demo configuration");
|
info!("DecksCache: creating new with demo configuration");
|
||||||
let mut cache = DecksCache::new_with_demo_config(&mut timeline_cache, ctx);
|
DecksCache::new_with_demo_config(&mut timeline_cache, ctx)
|
||||||
for (pk, _) in &ctx.accounts.cache {
|
//for (pk, _) in &ctx.accounts.cache {
|
||||||
cache.add_deck_default(*pk);
|
// cache.add_deck_default(*pk);
|
||||||
}
|
//}
|
||||||
|
|
||||||
cache
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let debug = ctx.args.debug;
|
let debug = ctx.args.debug;
|
||||||
|
|||||||
@@ -6,11 +6,9 @@ use notedeck::{AppContext, FALLBACK_PUBKEY};
|
|||||||
use tracing::{error, info};
|
use tracing::{error, info};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
accounts::AccountsRoute,
|
|
||||||
column::{Column, Columns},
|
column::{Column, Columns},
|
||||||
route::Route,
|
|
||||||
timeline::{TimelineCache, TimelineKind},
|
timeline::{TimelineCache, TimelineKind},
|
||||||
ui::{add_column::AddColumnRoute, configure_deck::ConfigureDeckResponse},
|
ui::configure_deck::ConfigureDeckResponse,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub enum DecksAction {
|
pub enum DecksAction {
|
||||||
@@ -333,29 +331,31 @@ pub fn demo_decks(
|
|||||||
) -> Decks {
|
) -> Decks {
|
||||||
let deck = {
|
let deck = {
|
||||||
let mut columns = Columns::default();
|
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();
|
let txn = Transaction::new(ctx.ndb).unwrap();
|
||||||
|
|
||||||
if let Some(results) = columns.add_new_timeline_column(
|
for kind in &timeline_kinds {
|
||||||
timeline_cache,
|
if let Some(results) = columns.add_new_timeline_column(
|
||||||
&txn,
|
timeline_cache,
|
||||||
ctx.ndb,
|
&txn,
|
||||||
ctx.note_cache,
|
|
||||||
ctx.pool,
|
|
||||||
&kind,
|
|
||||||
) {
|
|
||||||
results.process(
|
|
||||||
ctx.ndb,
|
ctx.ndb,
|
||||||
ctx.note_cache,
|
ctx.note_cache,
|
||||||
&txn,
|
ctx.pool,
|
||||||
timeline_cache,
|
kind,
|
||||||
ctx.unknown_ids,
|
) {
|
||||||
);
|
results.process(
|
||||||
|
ctx.ndb,
|
||||||
|
ctx.note_cache,
|
||||||
|
&txn,
|
||||||
|
timeline_cache,
|
||||||
|
ctx.unknown_ids,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//columns.add_new_timeline_column(Timeline::hashtag("introductions".to_string()));
|
//columns.add_new_timeline_column(Timeline::hashtag("introductions".to_string()));
|
||||||
|
|||||||
Reference in New Issue
Block a user