onboarding: lookup profile after accounts are added
To reduce the side effects of this change, we introduce a new UnknownId action type: - SingleUnkIdAction This can be returned from functions to signal that we need to do some work to look for things. We add a `must_use` directive to this type to ensure callers handle it. Changelog-Fixed: Fix missing profiles when new accounts are added Fixes: https://github.com/damus-io/notedeck/issues/356
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use std::path::Path;
|
||||
|
||||
use enostr::{FullKeypair, Pubkey, RelayPool};
|
||||
use nostrdb::ProfileRecord;
|
||||
use nostrdb::{ProfileRecord, Transaction};
|
||||
|
||||
use crate::{user_account::UserAccount, Damus};
|
||||
|
||||
@@ -100,8 +100,11 @@ pub fn test_app() -> Damus {
|
||||
let mut app = Damus::mock(path);
|
||||
|
||||
let accounts = get_test_accounts();
|
||||
let txn = Transaction::new(&app.ndb).expect("txn");
|
||||
for account in accounts {
|
||||
app.accounts_mut().add_account(account);
|
||||
app.accounts_mut()
|
||||
.add_account(account)
|
||||
.process_action(&mut app.unknown_ids, &app.ndb, &txn)
|
||||
}
|
||||
|
||||
app
|
||||
|
||||
Reference in New Issue
Block a user