mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
fix redirection info reset
This commit is contained in:
parent
0d202a866a
commit
01ea693c03
12 changed files with 59 additions and 36 deletions
|
|
@ -26,7 +26,7 @@ pub fn build(mime: &str, download: Option<(&Rc<ItemAction>, &Uri)>) -> StatusPag
|
|||
move |_| {
|
||||
action
|
||||
.load
|
||||
.activate(Some(&format!("download:{}", request)), true)
|
||||
.activate(Some(&format!("download:{}", request)), true, false)
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ impl Gemini {
|
|||
// Select link handler by scheme
|
||||
return match uri.scheme().as_str() {
|
||||
"gemini" | "titan" => {
|
||||
item_action.load.activate(Some(&uri.to_str()), true)
|
||||
item_action.load.activate(Some(&uri.to_str()), true, false)
|
||||
}
|
||||
// Scheme not supported, delegate
|
||||
_ => UriLauncher::new(&uri.to_str()).launch(
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ impl Response for Box {
|
|||
Uri::escape_string(&text_view.text(), None, false),
|
||||
)),
|
||||
false,
|
||||
false,
|
||||
)
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ impl Sensitive for Box {
|
|||
Uri::escape_string(&form.password_entry_row.text(), None, false),
|
||||
)),
|
||||
false,
|
||||
false,
|
||||
)
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -73,7 +73,10 @@ impl Info {
|
|||
|
||||
/// Reset `Self` to the clean state
|
||||
/// * this method keeps `Redirect` value!
|
||||
pub fn reset(&mut self) -> &mut Self {
|
||||
pub fn reset(&mut self, is_unset_redirect: bool) -> &mut Self {
|
||||
if is_unset_redirect {
|
||||
self.set_redirect(None);
|
||||
}
|
||||
self.clear_events()
|
||||
.set_header(None)
|
||||
.set_mime(None)
|
||||
|
|
@ -102,6 +105,11 @@ impl Info {
|
|||
self
|
||||
}
|
||||
|
||||
pub fn set_redirect(&mut self, redirect: Option<Redirect>) -> &mut Self {
|
||||
self.redirect = redirect;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn set_socket(&mut self, address: Option<(SocketAddress, SocketAddress)>) -> &mut Self {
|
||||
self.socket = address.map(|(local_address, remote_address)| Socket {
|
||||
local_address,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue