mirror of
https://github.com/itsjunetime/tdf.git
synced 2026-06-02 08:01:47 -04:00
yaaayyyy it works
This commit is contained in:
+6
-2
@@ -1,4 +1,4 @@
|
|||||||
use std::{io::Write, num::NonZeroU32};
|
use std::io::Write;
|
||||||
|
|
||||||
use crossterm::{cursor::MoveTo, event::EventStream, execute};
|
use crossterm::{cursor::MoveTo, event::EventStream, execute};
|
||||||
use kittage::{
|
use kittage::{
|
||||||
@@ -62,6 +62,10 @@ pub async fn display_kitty_images(
|
|||||||
images: Vec<(usize, &mut MaybeTransferred, Rect)>,
|
images: Vec<(usize, &mut MaybeTransferred, Rect)>,
|
||||||
ev_stream: &mut EventStream
|
ev_stream: &mut EventStream
|
||||||
) -> Result<(), (Vec<usize>, String)> {
|
) -> Result<(), (Vec<usize>, String)> {
|
||||||
|
if images.is_empty() {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
run_action(
|
run_action(
|
||||||
Action::Delete(DeleteConfig {
|
Action::Delete(DeleteConfig {
|
||||||
effect: ClearOrDelete::Clear,
|
effect: ClearOrDelete::Clear,
|
||||||
@@ -142,7 +146,7 @@ pub async fn display_kitty_images(
|
|||||||
let e = run_action(
|
let e = run_action(
|
||||||
Action::Display {
|
Action::Display {
|
||||||
image_id: *image_id,
|
image_id: *image_id,
|
||||||
placement_id: NonZeroU32::new(1).unwrap(),
|
placement_id: *image_id,
|
||||||
config
|
config
|
||||||
},
|
},
|
||||||
ev_stream
|
ev_stream
|
||||||
|
|||||||
Reference in New Issue
Block a user