mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-30 13:04:13 +00:00
fix home button status detection
This commit is contained in:
parent
dd6e0a3df6
commit
44c669389a
@ -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,
|
||||||
|
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user