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 self.bookmark
.update(self.profile.bookmark.get(&request_text).is_ok()); .update(self.profile.bookmark.get(&request_text).is_ok());
self.history.update(); self.history.update();
self.home.update(&self.request.strip_prefix()); self.home.update(&request_text);
self.reload.update(!request_text.is_empty()); self.reload.update(!request_text.is_empty());
self.request.update( self.request.update(
progress_fraction, progress_fraction,

View File

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