use new selfAddr

This commit is contained in:
adbenitez
2024-11-23 21:56:38 +01:00
parent 6b684bf030
commit b47e75eed6
@@ -70,6 +70,7 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
private DcMsg dcAppMsg;
private String baseURL;
private String sourceCodeUrl = "";
private String selfAddr = "";
private boolean internetAccess = false;
private boolean hideActionBar = false;
@@ -189,6 +190,7 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
final JSONObject info = this.dcAppMsg.getWebxdcInfo();
internetAccess = JsonUtils.optBoolean(info, "internet_access");
selfAddr = JsonUtils.optString(info, "self_addr");
toggleFakeProxy(!internetAccess);
@@ -454,7 +456,7 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
class InternalJSApi {
@JavascriptInterface
public String selfAddr() {
return WebxdcActivity.this.dcContext.getConfig("addr");
return WebxdcActivity.this.selfAddr;
}
/** @noinspection unused*/