Update modalkit and modalkit-ratatui to SHA 45855daeeb (#358)

This commit is contained in:
Jihyeon Kim (김지현) 2025-05-16 12:09:12 +09:00 committed by GitHub
parent ebd89423e9
commit 6e923f3878
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 455 additions and 106 deletions

View file

@ -310,7 +310,7 @@ impl Application {
}
term.draw(|f| {
let area = f.size();
let area = f.area();
let modestr = bindings.show_mode();
let cursor = bindings.get_cursor_indicator();
@ -339,7 +339,7 @@ impl Application {
let inner = Rect::new(cx, cy, 1, 1);
f.render_widget(para, inner)
}
f.set_cursor(cx, cy);
f.set_cursor_position((cx, cy));
}
})?;

View file

@ -63,7 +63,7 @@ pub fn spawn_insert_preview(
let img = download_or_load(event_id.to_owned(), source, media, cache_dir)
.await
.map(std::io::Cursor::new)
.map(image::io::Reader::new)
.map(image::ImageReader::new)
.map_err(IambError::Matrix)
.and_then(|reader| reader.with_guessed_format().map_err(IambError::IOError))
.and_then(|reader| reader.decode().map_err(IambError::Image));

View file

@ -596,7 +596,7 @@ impl ChatState {
let dynimage = image::DynamicImage::ImageRgba8(imagebuf);
let bytes = Vec::<u8>::new();
let mut buff = std::io::Cursor::new(bytes);
dynimage.write_to(&mut buff, image::ImageOutputFormat::Png)?;
dynimage.write_to(&mut buff, image::ImageFormat::Png)?;
Ok(buff.into_inner())
})
.map_err(IambError::from)?;