api(dialogs): change dialog event callback thread to caller thread

This commit is contained in:
hyb1996
2018-04-18 17:48:26 +08:00
parent 97198ad668
commit baaa820d09
7 changed files with 80 additions and 41 deletions

View File

@@ -119,11 +119,13 @@ module.exports = function(__runtime__, scope){
"negative": {method: "negativeText"},
"negativeColor": {adapter: parseColor},
"cancelable": null,
"canceledOnTouchOutside": null
"canceledOnTouchOutside": null,
autoDismiss: null
};
dialogs.build = function(properties){
var builder = __runtime__.dialogs.newBuilder();
var builder = Object.create(__runtime__.dialogs.newBuilder());
builder.thread = threads.currentThread();
for(var name in properties){
if(!properties.hasOwnProperty(name)){
continue;