2023-06-14 21:49:20 +00:00
|
|
|
mod ui;
|
2023-06-15 17:19:24 +00:00
|
|
|
mod accounts;
|
2023-06-15 22:15:07 +00:00
|
|
|
mod app;
|
2023-06-14 21:49:20 +00:00
|
|
|
|
2023-06-15 19:57:43 +00:00
|
|
|
use matrix_sdk::ruma::exports::serde_json;
|
2023-06-15 17:19:24 +00:00
|
|
|
use tokio::time::{sleep, Duration};
|
2023-06-23 03:41:26 +00:00
|
|
|
use crate::app::Message;
|
|
|
|
use crate::ui::UI;
|
2023-06-14 21:49:20 +00:00
|
|
|
|
2023-06-15 17:19:24 +00:00
|
|
|
#[tokio::main]
|
|
|
|
async fn main() -> anyhow::Result<()> {
|
|
|
|
tracing_subscriber::fmt::init();
|
|
|
|
|
2023-06-15 22:15:07 +00:00
|
|
|
let mut app = app::App::new();
|
2023-06-23 03:41:26 +00:00
|
|
|
app.fill_test_data();
|
2023-06-15 19:57:43 +00:00
|
|
|
|
2023-06-23 14:07:18 +00:00
|
|
|
let client = app.accounts_manager.add("https://nerdcult.net", "test", "abcd1234").await?;
|
|
|
|
|
2023-06-23 03:41:26 +00:00
|
|
|
let mut ui = UI::new();
|
|
|
|
ui.draw_main(&app)?;
|
|
|
|
|
|
|
|
|
2023-06-15 19:57:43 +00:00
|
|
|
|
2023-06-23 14:07:18 +00:00
|
|
|
// let client = app.accounts_manager.login(0).await?;
|
2023-06-15 22:15:07 +00:00
|
|
|
// app.client = Some(client);
|
2023-06-14 21:49:20 +00:00
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|