use title from status

This commit is contained in:
yggverse 2024-12-12 15:57:22 +02:00
parent 9c31cabb24
commit 9411208c74

View File

@ -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" => {