1
0
Fork 0
trinitrix/src/main.rs

27 lines
498 B
Rust
Raw Normal View History

2023-06-14 21:49:20 +00:00
mod ui;
mod accounts;
mod app;
2023-06-14 21:49:20 +00:00
use matrix_sdk::ruma::exports::serde_json;
use tokio::time::{sleep, Duration};
use std::{io, thread};
2023-06-23 03:41:26 +00:00
use crate::app::Message;
use crate::ui::UI;
2023-06-14 21:49:20 +00:00
#[tokio::main]
async fn main() -> anyhow::Result<()> {
tracing_subscriber::fmt::init();
let mut app = app::App::new();
2023-06-23 03:41:26 +00:00
app.fill_test_data();
2023-06-23 03:41:26 +00:00
let mut ui = UI::new();
if app.accounts_manager.num_accounts() == 0 {
ui.setup(&mut app).await?;
}
ui.main(&mut app).await?;
2023-06-14 21:49:20 +00:00
Ok(())
}