mirror of
https://github.com/status-im/react-native-webview.git
synced 2025-02-21 16:28:33 +00:00
fix(android): updating source.html prop doesn't refresh webview (#485)
This commit is contained in:
parent
0beeaa3fd4
commit
9aa14f1a96
@ -373,12 +373,8 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
|
||||
if (source != null) {
|
||||
if (source.hasKey("html")) {
|
||||
String html = source.getString("html");
|
||||
if (source.hasKey("baseUrl")) {
|
||||
view.loadDataWithBaseURL(
|
||||
source.getString("baseUrl"), html, HTML_MIME_TYPE, HTML_ENCODING, null);
|
||||
} else {
|
||||
view.loadData(html, HTML_MIME_TYPE + "; charset=" + HTML_ENCODING, null);
|
||||
}
|
||||
String baseUrl = source.hasKey("baseUrl") ? source.getString("baseUrl") : "";
|
||||
view.loadDataWithBaseURL(baseUrl, html, HTML_MIME_TYPE, HTML_ENCODING, null);
|
||||
return;
|
||||
}
|
||||
if (source.hasKey("uri")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user