mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
use new selfAddr
This commit is contained in:
@@ -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*/
|
||||
|
||||
Reference in New Issue
Block a user