mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
update home button status detection
This commit is contained in:
parent
c5fad47a20
commit
5943ea622a
3 changed files with 27 additions and 23 deletions
|
|
@ -42,7 +42,7 @@ impl Navigation {
|
|||
let reload = Rc::new(Reload::build(window_action));
|
||||
let request = Rc::new(Request::build((browser_action, tab_action)));
|
||||
let bookmark = Rc::new(Bookmark::build(window_action));
|
||||
let home = Rc::new(Home::build(window_action, &request));
|
||||
let home = Rc::new(Home::build(window_action));
|
||||
|
||||
// init main widget
|
||||
let widget = Rc::new(Widget::build(
|
||||
|
|
@ -76,9 +76,17 @@ impl Navigation {
|
|||
.update(self.profile.bookmark.get(&request).is_ok());
|
||||
self.history.update();
|
||||
self.reload.update(!request.is_empty());
|
||||
self.request
|
||||
.update(self.profile.identity.get(&request).is_some());
|
||||
self.home.update();
|
||||
self.request.update(
|
||||
self.profile
|
||||
.identity
|
||||
.get(&self.request.strip_prefix())
|
||||
.is_some(),
|
||||
);
|
||||
self.home.update(
|
||||
self.request
|
||||
.home()
|
||||
.is_some_and(|home| home.to_string() != request),
|
||||
);
|
||||
}
|
||||
|
||||
pub fn clean(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue