mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 09:10:08 +00:00
use ggemini 0.13.0 version from repository
This commit is contained in:
parent
596589a2f4
commit
e135332698
@ -17,7 +17,7 @@ features = ["v1_5"]
|
|||||||
|
|
||||||
[dependencies.gemini]
|
[dependencies.gemini]
|
||||||
package = "ggemini"
|
package = "ggemini"
|
||||||
version = "0.12.0"
|
version = "0.13.0"
|
||||||
|
|
||||||
[dependencies.gemtext]
|
[dependencies.gemtext]
|
||||||
package = "ggemtext"
|
package = "ggemtext"
|
||||||
@ -47,5 +47,5 @@ version = "0.9.1"
|
|||||||
|
|
||||||
# development
|
# development
|
||||||
[patch.crates-io]
|
[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" }
|
# ggemtext = { git = "https://github.com/YGGverse/ggemtext.git" }
|
||||||
|
@ -528,8 +528,8 @@ impl Page {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else { // browse
|
} else { // browse
|
||||||
match response.meta.mime {
|
match response.meta.mime.unwrap().value.to_lowercase().as_str() {
|
||||||
Some(gemini::client::connection::response::meta::Mime::TextGemini) => {
|
"text/gemini" => {
|
||||||
// Read entire input stream to buffer
|
// Read entire input stream to buffer
|
||||||
gemini::client::connection::response::data::Text::from_stream_async(
|
gemini::client::connection::response::data::Text::from_stream_async(
|
||||||
response.connection.stream(),
|
response.connection.stream(),
|
||||||
@ -592,12 +592,7 @@ impl Page {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
Some(
|
"image/png" | "image/gif" | "image/jpeg" | "image/webp" => {
|
||||||
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
|
|
||||||
) => {
|
|
||||||
// Final image size unknown, show loading widget
|
// Final image size unknown, show loading widget
|
||||||
let status = content.to_status_loading(
|
let status = content.to_status_loading(
|
||||||
Some(Duration::from_secs(1)) // show if download time > 1 second
|
Some(Duration::from_secs(1)) // show if download time > 1 second
|
||||||
|
Loading…
x
Reference in New Issue
Block a user