Skip to content

Commit

Permalink
fixup! feat: add find-in-page, closes #585
Browse files Browse the repository at this point in the history
  • Loading branch information
keiya01 committed May 23, 2022
1 parent bcf63f6 commit 44b5b85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/find_in_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ fn main() -> wry::Result<()> {
text,
FindInPageOption {
case_sensitive: true,
max_match_count: 100,
..FindInPageOption::default()
},
|found| println!("Is found: {}", found),
Expand Down
6 changes: 3 additions & 3 deletions src/webview/webkitgtk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ impl InnerWebView {
};

let find_controller = {
let mut builder = FindControllerBuilder::new();
let builder = FindControllerBuilder::new();
let controller = builder.web_view(&*webview).build();
Rc::new(controller)
};
Expand Down Expand Up @@ -424,10 +424,10 @@ impl InnerWebView {

self
.find_controller
.connect_failed_to_find_text(move |_| (*f)(false));
.connect_failed_to_find_text(move |_| (*handler)(false));
self
.find_controller
.connect_found_text(move |_, _| (*f)(true));
.connect_found_text(move |_, _| (*found)(true));
}
}

Expand Down

0 comments on commit 44b5b85

Please sign in to comment.