Fallback to the url if a tabs title is empty (#33391)

Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
This commit is contained in:
Ben 2024-09-10 07:05:15 +00:00 committed by GitHub
parent f1ad364ec2
commit 7ec22306e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -359,8 +359,8 @@ impl Minibrowser {
|ui| {
for (webview_id, webview) in webviews.webviews().into_iter() {
let label = match (&webview.title, &webview.url) {
(Some(title), _) => title,
(None, Some(url)) => &url.to_string(),
(Some(title), _) if !title.is_empty() => title,
(_, Some(url)) => &url.to_string(),
_ => "New Tab",
};
if let Some(event) =