From 56956075b09639712f4aaead991970f0c2c73f33 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 1 Nov 2024 05:03:15 +0200 Subject: [PATCH] update ggemini api --- src/app/browser/window/tab/item/page.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/app/browser/window/tab/item/page.rs b/src/app/browser/window/tab/item/page.rs index c44e358a..2a1cae7b 100644 --- a/src/app/browser/window/tab/item/page.rs +++ b/src/app/browser/window/tab/item/page.rs @@ -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