Add AccountManager to app

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2024-05-22 16:27:23 -04:00
committed by William Casarin
parent 748d9d2358
commit 11b3effa51
5 changed files with 93 additions and 59 deletions

View File

@@ -91,7 +91,7 @@ impl<'a> DesktopGlobalPopup<'a> {
mod preview {
use crate::{
test_data::get_test_accounts,
test_data,
ui::{DesktopSidePanel, Preview, View},
Damus,
};
@@ -113,7 +113,10 @@ mod preview {
impl GlobalPopupPreview {
fn new() -> Self {
let mut app = Damus::mock(".");
app.accounts = get_test_accounts();
let accounts = test_data::get_test_accounts();
accounts
.into_iter()
.for_each(|acc| app.account_manager.add_account(acc.key, || {}));
GlobalPopupPreview { app }
}
}