Skip to content

Commit

Permalink
fix(android): use correct method signature (#917)
Browse files Browse the repository at this point in the history
* fix(android): use correct method signature

* Update android-url.md
  • Loading branch information
amrbashir authored Mar 31, 2023
1 parent f76568a commit c22744a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .changes/android-url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"wry": patch
---
Fix `WebView::url` getter on Android.
5 changes: 5 additions & 0 deletions .changes/fix-with_url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": patch
---

Fix the `WebViewBuilder::with_url` when the projet use `mimalloc`
5 changes: 0 additions & 5 deletions .changes/fix-with_url.txt

This file was deleted.

2 changes: 1 addition & 1 deletion src/webview/android/main_pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl MainPipe<'_> {
WebViewMessage::GetUrl(tx) => {
if let Some(webview) = &self.webview {
let url = env
.call_method(webview.as_obj(), "getUrl", "()Ljava/lang/String", &[])
.call_method(webview.as_obj(), "getUrl", "()Ljava/lang/String;", &[])
.and_then(|v| v.l())
.and_then(|s| env.get_string(s.into()))
.map(|u| u.to_string_lossy().into())
Expand Down

0 comments on commit c22744a

Please sign in to comment.