use ggemini 0.13.0 version from repository

This commit is contained in:
yggverse 2024-12-12 12:01:07 +02:00
parent 596589a2f4
commit e135332698
2 changed files with 5 additions and 10 deletions

View File

@ -17,7 +17,7 @@ features = ["v1_5"]
[dependencies.gemini]
package = "ggemini"
version = "0.12.0"
version = "0.13.0"
[dependencies.gemtext]
package = "ggemtext"
@ -47,5 +47,5 @@ version = "0.9.1"
# development
[patch.crates-io]
# ggemini = { git = "https://github.com/YGGverse/ggemini.git" }
ggemini = { path = "https://github.com/YGGverse/ggemini.git" }
# ggemtext = { git = "https://github.com/YGGverse/ggemtext.git" }

View File

@ -528,8 +528,8 @@ impl Page {
}
);
} else { // browse
match response.meta.mime {
Some(gemini::client::connection::response::meta::Mime::TextGemini) => {
match response.meta.mime.unwrap().value.to_lowercase().as_str() {
"text/gemini" => {
// Read entire input stream to buffer
gemini::client::connection::response::data::Text::from_stream_async(
response.connection.stream(),
@ -592,12 +592,7 @@ impl Page {
}
);
},
Some(
gemini::client::connection::response::meta::Mime::ImagePng |
gemini::client::connection::response::meta::Mime::ImageGif |
gemini::client::connection::response::meta::Mime::ImageJpeg |
gemini::client::connection::response::meta::Mime::ImageWebp
) => {
"image/png" | "image/gif" | "image/jpeg" | "image/webp" => {
// Final image size unknown, show loading widget
let status = content.to_status_loading(
Some(Duration::from_secs(1)) // show if download time > 1 second