remove extra lines

This commit is contained in:
yggverse 2025-03-25 04:03:22 +02:00
parent 37efb30729
commit 898c6d407f

View File

@ -216,43 +216,28 @@ fn handle(
page.snap_history(); page.snap_history();
} }
redirects.replace(0); // reset redirects.replace(0); // reset
let mut i = page.navigation.request.info.borrow_mut();
i
.add_event(EVENT_COMPLETED.to_string())
.set_size(Some(input.as_bytes().len()), None)
.unset_mime()
.commit();
page.navigation.request.update_secondary_icon(&i);
match input { match input {
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-10 // https://geminiprotocol.net/docs/protocol-specification.gmi#status-10
Input::Default(default) => { Input::Default(d) => page.input.set_new_response(
{ page.item_action.clone(),
let mut i = page.navigation.request.info.borrow_mut(); uri,
i Some(d.message_or_default()),
.add_event(EVENT_COMPLETED.to_string()) Some(1024),
.set_size(Some(default.as_bytes().len()), None) ),
.unset_mime()
.commit();
page.navigation.request.update_secondary_icon(&i)
}
page.input.set_new_response(
page.item_action.clone(),
uri,
Some(default.message().unwrap_or("Input expected")),
Some(1024),
)
},
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-11-sensitive-input // https://geminiprotocol.net/docs/protocol-specification.gmi#status-11-sensitive-input
Input::Sensitive(sensitive) => { Input::Sensitive(s) => page.input.set_new_sensitive(
{ page.item_action.clone(),
let mut i = page.navigation.request.info.borrow_mut(); uri,
i Some(s.message_or_default()),
.add_event(EVENT_COMPLETED.to_string()) Some(1024),
.set_size(Some(sensitive.as_bytes().len()), None) )
.unset_mime()
.commit();
page.navigation.request.update_secondary_icon(&i)
}
page.input.set_new_sensitive(
page.item_action.clone(),
uri,
Some(sensitive.message().unwrap_or("Sensitive input expected")),
Some(1024),
)
}
} }
} }
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-20 // https://geminiprotocol.net/docs/protocol-specification.gmi#status-20