Join rooms from "join room" overlay
This commit is contained in:
parent
1949b6f5e1
commit
1543940fbc
3 changed files with 44 additions and 14 deletions
|
|
@ -6,6 +6,7 @@ mod ui;
|
|||
|
||||
use std::io;
|
||||
|
||||
use config::Config;
|
||||
use crossterm::event::{DisableMouseCapture, EnableMouseCapture};
|
||||
use crossterm::execute;
|
||||
use crossterm::terminal::{EnterAlternateScreen, LeaveAlternateScreen};
|
||||
|
|
@ -15,6 +16,8 @@ use ui::Ui;
|
|||
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
let config = Box::leak(Box::new(Config::load()));
|
||||
|
||||
let mut terminal = Terminal::new(CrosstermBackend::new(io::stdout()))?;
|
||||
|
||||
crossterm::terminal::enable_raw_mode()?;
|
||||
|
|
@ -25,7 +28,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
)?;
|
||||
|
||||
// Defer error handling so the terminal always gets restored properly
|
||||
let result = Ui::run(&mut terminal).await;
|
||||
let result = Ui::run(config, &mut terminal).await;
|
||||
|
||||
execute!(
|
||||
terminal.backend_mut(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue