update ggemini api

This commit is contained in:
yggverse 2024-11-01 05:03:15 +02:00
parent 939b44030d
commit 56956075b0

View File

@ -478,7 +478,7 @@ impl Page {
gemini::client::response::meta::Status::Success => {
// Route by MIME
match response.mime() {
gemini::client::response::meta::Mime::TextGemini => {
Some(gemini::client::response::meta::Mime::TextGemini) => {
// Read entire input stream to buffer
gemini::client::response::data::Text::from_socket_connection_async(
connection,
@ -535,11 +535,12 @@ impl Page {
}
);
},
gemini::client::response::meta::Mime::ImagePng |
gemini::client::response::meta::Mime::ImageGif |
gemini::client::response::meta::Mime::ImageJpeg |
gemini::client::response::meta::Mime::ImageWebp
=> {
Some(
gemini::client::response::meta::Mime::ImagePng |
gemini::client::response::meta::Mime::ImageGif |
gemini::client::response::meta::Mime::ImageJpeg |
gemini::client::response::meta::Mime::ImageWebp
) => {
// Final image size unknown, show loading widget
let status = content.to_status_loading(
Some(Duration::from_secs(1)) // show if download time > 1 second