mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
integrate bookmark action
This commit is contained in:
parent
c279576ee2
commit
3db4c2c6be
9 changed files with 163 additions and 20 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue