integrate bookmark action

This commit is contained in:
yggverse 2024-11-12 18:02:35 +02:00
parent c279576ee2
commit 3db4c2c6be
9 changed files with 163 additions and 20 deletions

View file

@ -152,6 +152,16 @@ impl Tab {
self.widget.close_all();
}
pub fn bookmark(&self, page_position: Option<i32>) {
if let Some(page) = self.widget.page(page_position) {
if let Some(id) = page.keyword() {
if let Some(item) = self.index.borrow().get(&id) {
item.page().bookmark();
}
}
}
}
// Toggle pin status for active tab
pub fn pin(&self, page_position: Option<i32>) {
self.widget.pin(page_position);