fix home button status detection

This commit is contained in:
yggverse 2024-12-12 22:41:12 +02:00
parent dd6e0a3df6
commit 44c669389a
2 changed files with 3 additions and 4 deletions

View File

@ -72,7 +72,7 @@ impl Navigation {
self.bookmark
.update(self.profile.bookmark.get(&request_text).is_ok());
self.history.update();
self.home.update(&self.request.strip_prefix());
self.home.update(&request_text);
self.reload.update(!request_text.is_empty());
self.request.update(
progress_fraction,

View File

@ -26,9 +26,8 @@ impl Home {
pub fn update(&self, request: &str) {
let has_home = match Uri::parse(request, UriFlags::NONE) {
Ok(uri) => {
let has_home = "/" != uri.path();
self.uri.replace(Some(uri));
has_home
self.uri.replace(Some(uri.clone()));
uri.path().len() > 1
}
_ => {
self.uri.replace(None);