mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
update ggemtext api version
This commit is contained in:
parent
eb70c2d873
commit
a5c0a4bdd0
3 changed files with 12 additions and 15 deletions
|
|
@ -866,12 +866,12 @@ pub fn migrate(tx: &Transaction) -> Result<(), String> {
|
|||
/// Useful as common placeholder when page title could not be detected
|
||||
///
|
||||
/// * this feature may be improved and moved outside @TODO
|
||||
fn uri_to_title(uri: &Uri) -> GString {
|
||||
let title = GString::from(uri.path().split('/').last().unwrap_or_default());
|
||||
fn uri_to_title(uri: &Uri) -> String {
|
||||
let title = uri.path().split('/').last().unwrap_or_default().to_string();
|
||||
if title.is_empty() {
|
||||
match uri.host() {
|
||||
Some(host) => gformat!("{host}"),
|
||||
None => gformat!("Untitled"),
|
||||
Some(host) => host.to_string(),
|
||||
None => "Untitled".to_string(),
|
||||
}
|
||||
} else {
|
||||
title
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue