mirror of
https://github.com/Xithrius/twitch-tui.git
synced 2024-09-11 05:35:26 +03:00
Attempting to fix the failing build.
This commit is contained in:
parent
943f10f187
commit
05d3c672bc
16
src/tui.rs
16
src/tui.rs
@ -1,8 +1,4 @@
|
||||
use std::{
|
||||
io,
|
||||
sync::mpsc::Receiver,
|
||||
time::Duration,
|
||||
};
|
||||
use std::{io, sync::mpsc::Receiver, time::Duration};
|
||||
|
||||
use anyhow::Result;
|
||||
use termion::{event::Key, input::MouseTerminal, raw::IntoRawMode, screen::AlternateScreen};
|
||||
@ -10,10 +6,9 @@ use tui::{
|
||||
backend::TermionBackend,
|
||||
layout::{Constraint, Direction, Layout},
|
||||
style::{Color, Style},
|
||||
widgets::{Block, Borders, Row, Table},
|
||||
Terminal,
|
||||
widgets::{Block, Borders, Paragraph, Row, Table},
|
||||
};
|
||||
use unicode_width::UnicodeWidthStr;
|
||||
|
||||
use crate::utils::{app::App, event};
|
||||
|
||||
@ -38,12 +33,7 @@ pub fn tui(mut app: App, rx: Receiver<Vec<String>>) -> Result<()> {
|
||||
let chunks = Layout::default()
|
||||
.direction(Direction::Vertical)
|
||||
.margin(1)
|
||||
.constraints(
|
||||
[
|
||||
Constraint::Min(1),
|
||||
]
|
||||
.as_ref(),
|
||||
)
|
||||
.constraints([Constraint::Min(1)].as_ref())
|
||||
.split(f.size());
|
||||
|
||||
let all_messages = app
|
||||
|
@ -1,9 +1,9 @@
|
||||
use std::io;
|
||||
use std::sync::{
|
||||
Arc,
|
||||
atomic::{AtomicBool, Ordering},
|
||||
};
|
||||
use std::sync::mpsc;
|
||||
use std::sync::{
|
||||
atomic::{AtomicBool, Ordering},
|
||||
Arc,
|
||||
};
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
||||
@ -17,9 +17,6 @@ pub enum Event<I> {
|
||||
|
||||
pub struct Events {
|
||||
rx: mpsc::Receiver<Event<Key>>,
|
||||
input_handle: thread::JoinHandle<()>,
|
||||
ignore_exit_key: Arc<AtomicBool>,
|
||||
tick_handle: thread::JoinHandle<()>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
|
Loading…
Reference in New Issue
Block a user