From cefdcdc8591447ca542063b906b010a6905c8e99 Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 30 Sep 2024 23:32:21 +0300 Subject: [PATCH] add follow_to_index argument --- src/browser/main/tab/page.rs | 4 ++-- src/browser/main/tab/page/navigation.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/browser/main/tab/page.rs b/src/browser/main/tab/page.rs index 49d32294..e5fe77f2 100644 --- a/src/browser/main/tab/page.rs +++ b/src/browser/main/tab/page.rs @@ -127,13 +127,13 @@ impl Page { } pub fn navigation_history_back(&self) { - if let Some(url) = self.navigation.history_back() { + if let Some(url) = self.navigation.history_back(true) { self.action_page_open.activate(Some(&url.to_variant())); } } pub fn navigation_history_forward(&self) { - if let Some(url) = self.navigation.history_forward() { + if let Some(url) = self.navigation.history_forward(true) { self.action_page_open.activate(Some(&url.to_variant())); } } diff --git a/src/browser/main/tab/page/navigation.rs b/src/browser/main/tab/page/navigation.rs index a54d6cde..5173efe9 100644 --- a/src/browser/main/tab/page/navigation.rs +++ b/src/browser/main/tab/page/navigation.rs @@ -89,12 +89,12 @@ impl Navigation { self.history.add(request, true); } - pub fn history_back(&self) -> Option { - self.history.back(true) + pub fn history_back(&self, follow_to_index: bool) -> Option { + self.history.back(follow_to_index) } - pub fn history_forward(&self) -> Option { - self.history.forward(true) + pub fn history_forward(&self, follow_to_index: bool) -> Option { + self.history.forward(follow_to_index) } pub fn update(&self, progress_fraction: Option) {