mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-09-07 12:21:48 +00:00
return legacy bookmark update feature
This commit is contained in:
parent
4b2a0a7660
commit
c6d24565fd
@ -71,6 +71,8 @@ impl Navigation {
|
||||
let request = self.request.strip_prefix();
|
||||
|
||||
// update children components
|
||||
self.bookmark
|
||||
.update(self.profile.bookmark.get(&request).is_ok());
|
||||
self.reload.set_sensitive(!request.is_empty());
|
||||
self.request.update(
|
||||
self.profile
|
||||
|
@ -10,7 +10,7 @@ const ICON_NON: &str = "non-starred-symbolic";
|
||||
|
||||
pub trait Bookmark {
|
||||
fn bookmark(action: &Rc<WindowAction>) -> Self;
|
||||
fn _update(&self, has_bookmark: bool); // @TODO
|
||||
fn update(&self, has_bookmark: bool);
|
||||
}
|
||||
|
||||
impl Bookmark for Button {
|
||||
@ -26,7 +26,7 @@ impl Bookmark for Button {
|
||||
.build()
|
||||
}
|
||||
|
||||
fn _update(&self, has_bookmark: bool) {
|
||||
fn update(&self, has_bookmark: bool) {
|
||||
self.set_icon_name(if has_bookmark { ICON_YES } else { ICON_NON });
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user