diff --git a/Cargo.toml b/Cargo.toml index e6275aa5..781fe593 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ version = "0.10.0" [dependencies] ansi-parser = "0.9.1" anyhow = "1.0.97" -ggemini = "0.19.0" +ggemini = "0.20.0" ggemtext = "0.7.0" indexmap = "2.10.0" itertools = "0.14.0" @@ -44,8 +44,8 @@ r2d2_sqlite = "0.31.0" syntect = "5.2.0" # development -# [patch.crates-io] -# ggemini = { git = "https://github.com/YGGverse/ggemini.git" } +[patch.crates-io] +ggemini = { git = "https://github.com/YGGverse/ggemini.git" } # ggemtext = { git = "https://github.com/YGGverse/ggemtext.git" } # plurify = { git = "https://github.com/YGGverse/plurify.git" } # libspelling = { git = "https://github.com/YGGverse/libspelling-rs.git", branch = "yoda-0.12"} diff --git a/src/app/browser/window/tab/item/client/driver/gemini.rs b/src/app/browser/window/tab/item/client/driver/gemini.rs index 0ed4dc4f..8a30f9f4 100644 --- a/src/app/browser/window/tab/item/client/driver/gemini.rs +++ b/src/app/browser/window/tab/item/client/driver/gemini.rs @@ -282,11 +282,7 @@ fn handle( file_output_stream, cancellable.clone(), Priority::DEFAULT, - file_output_stream::Size { - chunk: 0x100000, // 1M bytes per chunk - limit: None, // unlimited - total: 0, // initial totals - }, + file_output_stream::Size::default(), ( // on chunk { @@ -336,9 +332,8 @@ fn handle( Priority::DEFAULT, cancellable.clone(), memory_input_stream::Size { - chunk: 0x400, // 1024 bytes chunk limit: 0xfffff, // 1M limit - total: 0, // initial totals + ..memory_input_stream::Size::default() }, ( |_, _| {}, // on chunk (maybe nothing to count yet @TODO) @@ -440,9 +435,8 @@ fn handle( Priority::DEFAULT, cancellable.clone(), memory_input_stream::Size { - chunk: 0x400, // 1024 bytes chunk limit: 0xA00000, // 10M limit - total: 0, // initial totals + ..memory_input_stream::Size::default() }, ( move |_, total| status.set_description(Some(&format!("Download: {}", total.bytes()))), diff --git a/src/app/browser/window/tab/item/client/driver/nex.rs b/src/app/browser/window/tab/item/client/driver/nex.rs index b5c713b7..da3b2231 100644 --- a/src/app/browser/window/tab/item/client/driver/nex.rs +++ b/src/app/browser/window/tab/item/client/driver/nex.rs @@ -193,9 +193,8 @@ impl Nex { Priority::DEFAULT, cancellable.clone(), ggemini::gio::memory_input_stream::Size { - chunk: 0x400, // 1024 bytes chunk limit: 0xA00000, // 10M limit - total: 0, // initial totals + ..ggemini::gio::memory_input_stream::Size::default() }, ( { @@ -343,11 +342,7 @@ fn download(s: SocketConnection, (p, u): (Rc, Uri), c: Cancellable) { file_output_stream, c.clone(), Priority::DEFAULT, - file_output_stream::Size { - chunk: 0x100000, // 1M bytes per chunk - limit: None, // unlimited - total: 0, // initial totals - }, + file_output_stream::Size::default(), ( // on chunk {