fix(android): updating source.html prop doesn't refresh webview (#485)

This commit is contained in:
Scott Beca 2019-04-15 17:56:45 +10:00 committed by Thibault Malbranche
parent 0beeaa3fd4
commit 9aa14f1a96

View File

@ -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")) {