mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
use title from status
This commit is contained in:
parent
9c31cabb24
commit
9411208c74
1 changed files with 8 additions and 7 deletions
|
|
@ -467,14 +467,8 @@ impl Page {
|
||||||
snap_history(navigation.clone());
|
snap_history(navigation.clone());
|
||||||
}
|
}
|
||||||
if is_download {
|
if is_download {
|
||||||
// Update meta
|
|
||||||
meta.set_status(Status::Success).set_title("Download");
|
|
||||||
|
|
||||||
// Update window
|
|
||||||
update.activate(Some(&id));
|
|
||||||
|
|
||||||
// Init download widget
|
// Init download widget
|
||||||
content.to_status_download(
|
let status = content.to_status_download(
|
||||||
&uri_to_title(&uri), // grab default filename
|
&uri_to_title(&uri), // grab default filename
|
||||||
&cancellable,
|
&cancellable,
|
||||||
{
|
{
|
||||||
|
|
@ -526,6 +520,13 @@ impl Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Update meta
|
||||||
|
meta.set_status(Status::Success)
|
||||||
|
.set_title(&status.title());
|
||||||
|
|
||||||
|
// Update window
|
||||||
|
update.activate(Some(&id));
|
||||||
} else { // browse
|
} else { // browse
|
||||||
match response.meta.mime.unwrap().value.to_lowercase().as_str() {
|
match response.meta.mime.unwrap().value.to_lowercase().as_str() {
|
||||||
"text/gemini" => {
|
"text/gemini" => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue