return legacy bookmark update feature

This commit is contained in:
yggverse 2025-01-25 17:44:10 +02:00
parent 4b2a0a7660
commit c6d24565fd
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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 });
}
}