mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
update ggemini api
This commit is contained in:
parent
939b44030d
commit
56956075b0
@ -478,7 +478,7 @@ impl Page {
|
|||||||
gemini::client::response::meta::Status::Success => {
|
gemini::client::response::meta::Status::Success => {
|
||||||
// Route by MIME
|
// Route by MIME
|
||||||
match response.mime() {
|
match response.mime() {
|
||||||
gemini::client::response::meta::Mime::TextGemini => {
|
Some(gemini::client::response::meta::Mime::TextGemini) => {
|
||||||
// Read entire input stream to buffer
|
// Read entire input stream to buffer
|
||||||
gemini::client::response::data::Text::from_socket_connection_async(
|
gemini::client::response::data::Text::from_socket_connection_async(
|
||||||
connection,
|
connection,
|
||||||
@ -535,11 +535,12 @@ impl Page {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
Some(
|
||||||
gemini::client::response::meta::Mime::ImagePng |
|
gemini::client::response::meta::Mime::ImagePng |
|
||||||
gemini::client::response::meta::Mime::ImageGif |
|
gemini::client::response::meta::Mime::ImageGif |
|
||||||
gemini::client::response::meta::Mime::ImageJpeg |
|
gemini::client::response::meta::Mime::ImageJpeg |
|
||||||
gemini::client::response::meta::Mime::ImageWebp
|
gemini::client::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