Do not allow empty polycentric comments.

This commit is contained in:
Koen 2023-11-16 15:51:34 +01:00
parent 1393c489c1
commit b3f9b81984

View file

@ -85,6 +85,11 @@ class CommentDialog(context: Context?, val contextUrl: String, val ref: Protocol
return@setOnClickListener;
}
if (_editComment.text.isBlank()) {
UIDialogs.toast(context, "Comment should not be blank.");
return@setOnClickListener;
}
val comment = _editComment.text.toString();
val processHandle = StatePolycentric.instance.processHandle!!
val eventPointer = processHandle.post(comment, null, ref)