feat:fix in Android promise invoked immediately
This commit is contained in:
parent
9b9d8de262
commit
359e974424
@ -145,6 +145,7 @@ public class ShaderPlugin extends DoricJavaPlugin {
|
|||||||
};
|
};
|
||||||
AsyncResult<JavaValue> asyncResult = getDoricContext().getDriver()
|
AsyncResult<JavaValue> asyncResult = getDoricContext().getDriver()
|
||||||
.asyncCall(callable, ThreadMode.UI);
|
.asyncCall(callable, ThreadMode.UI);
|
||||||
|
if (!method.getReturnType().equals(Void.TYPE)) {
|
||||||
asyncResult.setCallback(new AsyncResult.Callback<JavaValue>() {
|
asyncResult.setCallback(new AsyncResult.Callback<JavaValue>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResult(JavaValue result) {
|
public void onResult(JavaValue result) {
|
||||||
@ -163,6 +164,7 @@ public class ShaderPlugin extends DoricJavaPlugin {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (ArchiveException e) {
|
} catch (ArchiveException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user