feat:fix Prompt bridge error
This commit is contained in:
parent
660503e88c
commit
b19a3e32f3
@ -72,7 +72,7 @@ public class ModalPlugin extends DoricJavaPlugin {
|
||||
|
||||
}
|
||||
toast.show();
|
||||
} catch (ArchiveException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -101,13 +101,9 @@ public class ModalPlugin extends DoricJavaPlugin {
|
||||
}
|
||||
});
|
||||
builder.setCancelable(false);
|
||||
try {
|
||||
builder.show();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (ArchiveException e) {
|
||||
e.printStackTrace();
|
||||
promise.reject(new JavaValue(e.getLocalizedMessage()));
|
||||
}
|
||||
}
|
||||
@ -148,13 +144,9 @@ public class ModalPlugin extends DoricJavaPlugin {
|
||||
}
|
||||
});
|
||||
builder.setCancelable(false);
|
||||
try {
|
||||
builder.show();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (ArchiveException e) {
|
||||
e.printStackTrace();
|
||||
promise.reject(new JavaValue(e.getLocalizedMessage()));
|
||||
}
|
||||
}
|
||||
@ -187,7 +179,9 @@ public class ModalPlugin extends DoricJavaPlugin {
|
||||
|
||||
View v = LayoutInflater.from(getDoricContext().getContext()).inflate(R.layout.doric_modal_prompt, null);
|
||||
TextView tvMsg = v.findViewById(R.id.tv_msg);
|
||||
if (msgVal.isString()) {
|
||||
tvMsg.setText(msgVal.asString().value());
|
||||
}
|
||||
final EditText editText = v.findViewById(R.id.edit_input);
|
||||
if (defaultVal.isString()) {
|
||||
editText.setHint(defaultVal.asString().value());
|
||||
@ -211,13 +205,9 @@ public class ModalPlugin extends DoricJavaPlugin {
|
||||
}
|
||||
});
|
||||
builder.setCancelable(false);
|
||||
try {
|
||||
builder.show();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (ArchiveException e) {
|
||||
e.printStackTrace();
|
||||
promise.reject(new JavaValue(e.getLocalizedMessage()));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user