mirror of
https://github.com/youwen5/iamb.git
synced 2025-08-04 03:28:28 -07:00
Update modalkit
and modalkit-ratatui
to SHA 45855daeeb
(#358)
This commit is contained in:
parent
ebd89423e9
commit
6e923f3878
5 changed files with 455 additions and 106 deletions
|
@ -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));
|
||||
}
|
||||
})?;
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue