zalo-js-bridge
Advanced tools
Comparing version 1.11.1 to 1.11.2
# Base Library Update Logs | ||
## 1.11.2 (2021-06-21) | ||
### Bug Fixes | ||
* add param timeout 5ca616a | ||
## 1.11.1 (2021-06-01) | ||
@@ -4,0 +11,0 @@ |
@@ -94,3 +94,2 @@ "use strict"; | ||
exports.Action.getdownloadedsticker, | ||
exports.Action.openpostfeed, | ||
exports.Action.reportabuse, | ||
@@ -97,0 +96,0 @@ exports.Action.followoa, |
@@ -50,4 +50,4 @@ "use strict"; | ||
} | ||
callCustomAction(action, data, callback, isMultiCallback = true, nRetry = 3) { | ||
native_bridge_1.default.jsCall(action, data, callback, isMultiCallback, nRetry); | ||
callCustomAction(action, data, callback, isMultiCallback = true, nRetry = 3, haveTimeout = true) { | ||
native_bridge_1.default.jsCall(action, data, callback, isMultiCallback, nRetry, haveTimeout); | ||
} | ||
@@ -54,0 +54,0 @@ /** |
@@ -64,6 +64,4 @@ "use strict"; | ||
if (this._jsCallFuncCallbacks[key]) { | ||
const callback = this._jsCallFuncCallbacks[key] | ||
.callback; | ||
const timeout = this._jsCallFuncCallbacks[key] | ||
.timeout; | ||
const callback = this._jsCallFuncCallbacks[key].callback; | ||
const timeout = this._jsCallFuncCallbacks[key].timeout; | ||
if (!!callback) { | ||
@@ -96,6 +94,4 @@ try { | ||
if (this._jsCallFuncCallbacks[key]) { | ||
const callback = this._jsCallFuncCallbacks[key] | ||
.callback; | ||
const timeout = this._jsCallFuncCallbacks[key] | ||
.timeout; | ||
const callback = this._jsCallFuncCallbacks[key].callback; | ||
const timeout = this._jsCallFuncCallbacks[key].timeout; | ||
if (!!callback) { | ||
@@ -149,3 +145,3 @@ try { | ||
} | ||
jsCall(action, options, callback, isMultiCallback = false, nRetry = 3) { | ||
jsCall(action, options, callback, isMultiCallback = false, nRetry = 3, haveTimeout = true) { | ||
try { | ||
@@ -183,3 +179,4 @@ const key = common_1.generateUniqueString(action); | ||
this._jsCallFuncCallbacks[key] = { | ||
timeout: config_1.ActionHaveCallBack.includes(action) && | ||
timeout: haveTimeout && | ||
config_1.ActionHaveCallBack.includes(action) && | ||
setTimeout(() => { | ||
@@ -186,0 +183,0 @@ this.onJSCall(key, timeoutCallback); |
{ | ||
"name": "zalo-js-bridge", | ||
"description": "A Javascript Framework for WebApp", | ||
"version": "1.11.1", | ||
"version": "1.11.2", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "files": [ |
88838
2219