- Remove unused oxipng dep

- throw converter onto its own task
- switch to using multi-thread runtime
- use unbounded channels in a few more places to prevent deadlocks
This commit is contained in:
itsjunetime
2024-05-27 00:30:56 -06:00
parent 492fa10e11
commit 9e4ee1ca97
6 changed files with 173 additions and 398 deletions
+2 -4
View File
@@ -88,7 +88,7 @@ impl Tui {
}
// TODO: Make a way to fill the width of the screen with one page and scroll down to view it
pub fn render(&mut self, frame: &mut Frame<'_>, main_area: &[Rect], end_update: &mut bool) {
pub fn render(&mut self, frame: &mut Frame<'_>, main_area: &[Rect]) {
let top_block = Block::new()
.padding(Padding {
right: 2,
@@ -220,7 +220,6 @@ impl Tui {
Self::render_loading_in(frame, img_area);
} else {
execute!(stdout(), BeginSynchronizedUpdate).unwrap();
*end_update = true;
let total_width = page_widths.iter().map(|(_, w)| w).sum::<u16>();
@@ -283,7 +282,7 @@ impl Tui {
match self.page as isize - old as isize {
0 => None,
change => Some(InputAction::ChangePageBy(change))
_ => Some(InputAction::JumpingToPage(self.page))
}
}
@@ -517,7 +516,6 @@ impl Tui {
pub enum InputAction {
Redraw,
ChangePageBy(isize),
JumpingToPage(usize),
Search(String),
QuitApp