aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
blob: a1a4220cc191a6076695523e76181656f483faa1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
mod db;
mod buffer;

use crate::buffer::{Client, Buffer};
use crate::buffer::Threads;

use std::io::{stdin, stdout};
use termion::raw::IntoRawMode;

fn main() {
    let stdin = stdin();
    let screen = stdout().into_raw_mode().unwrap();
    // let screen = AlternateScreen::from(screen);

    // hide the cursor
    let mut screen = termion::cursor::HideCursor::from(screen);

    let threads = Threads::from_query(String::from("tag:inbox"));
    threads.init(&mut screen);

    let client = Client::new(Buffer::Threads(threads));
    client.run(screen, stdin);
}