update variable name

This commit is contained in:
yggverse 2024-12-09 01:27:00 +02:00
parent 3b34b00ea4
commit fff97d3cc0

View File

@ -198,7 +198,7 @@ impl Page {
}; };
// Detect source view mode, return `request` string prepared for route // Detect source view mode, return `request` string prepared for route
let (request, is_view_source) = match request.strip_prefix("source:") { let (request, is_source) = match request.strip_prefix("source:") {
Some(postfix) => (GString::from(postfix), true), Some(postfix) => (GString::from(postfix), true),
None => (request, false), None => (request, false),
}; };
@ -213,7 +213,7 @@ impl Page {
// Route by scheme // Route by scheme
match uri.scheme().as_str() { match uri.scheme().as_str() {
"file" => todo!(), "file" => todo!(),
"gemini" => self.load_gemini(uri, is_history, is_view_source), // @TODO "gemini" => self.load_gemini(uri, is_history, is_source),
scheme => { scheme => {
// Define common data // Define common data
let status = Status::Failure; let status = Status::Failure;
@ -385,7 +385,7 @@ impl Page {
// Private helpers // Private helpers
// @TODO move outside // @TODO move outside
fn load_gemini(&self, uri: Uri, is_history: bool, is_view_source: bool) { fn load_gemini(&self, uri: Uri, is_history: bool, is_source: bool) {
// Init shared clones // Init shared clones
let cancellable = self.client.cancellable(); let cancellable = self.client.cancellable();
let update = self.browser_action.update.clone(); let update = self.browser_action.update.clone();
@ -497,7 +497,7 @@ impl Page {
Ok(buffer) => { Ok(buffer) => {
// Set children component, // Set children component,
// extract title from meta parsed // extract title from meta parsed
let title = if is_view_source { let title = if is_source {
content.to_text_source( content.to_text_source(
&buffer.data &buffer.data
); );