mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-03-13 06:01:21 +00:00
snap history on some conditions match only
This commit is contained in:
parent
80c9a2792a
commit
6585597103
@ -53,10 +53,6 @@ impl Client {
|
||||
self.page.set_title("Loading..");
|
||||
self.page.set_progress(0.1);
|
||||
|
||||
if is_snap_history {
|
||||
snap_history(&self.page, None);
|
||||
}
|
||||
|
||||
// run async resolver to detect Uri, scheme-less host, or search query
|
||||
lookup(&self.profile, request, self.cancellable(), {
|
||||
let driver = self.driver.clone();
|
||||
@ -65,8 +61,18 @@ impl Client {
|
||||
match result {
|
||||
// route by scheme
|
||||
Ok(uri) => match uri.scheme().as_str() {
|
||||
"file" => driver.file.handle(uri, feature, cancellable),
|
||||
"gemini" | "titan" => driver.gemini.handle(uri, feature, cancellable),
|
||||
"file" => {
|
||||
if is_snap_history {
|
||||
snap_history(&page, Some(&uri));
|
||||
}
|
||||
driver.file.handle(uri, feature, cancellable)
|
||||
}
|
||||
"gemini" | "titan" => {
|
||||
if is_snap_history {
|
||||
snap_history(&page, Some(&uri));
|
||||
}
|
||||
driver.gemini.handle(uri, feature, cancellable)
|
||||
}
|
||||
scheme => {
|
||||
// no scheme match driver, complete with failure message
|
||||
let status = page.content.to_status_failure();
|
||||
|
Loading…
x
Reference in New Issue
Block a user