mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 22:57:29 +00:00
simplify logic
This commit is contained in:
parent
86b9feda4a
commit
1a57969abe
@ -86,9 +86,11 @@ public final class DirectMessageThread extends BaseLanguageActivity {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
private final View.OnClickListener newCommentListener = v -> {
|
private final View.OnClickListener newCommentListener = v -> {
|
||||||
if (Utils.isEmpty(dmsBinding.commentText.getText().toString()) && v == dmsBinding.commentSend)
|
if (v == dmsBinding.commentSend) {
|
||||||
|
if (Utils.isEmpty(dmsBinding.commentText.getText().toString())) {
|
||||||
Toast.makeText(getApplicationContext(), R.string.comment_send_empty_comment, Toast.LENGTH_SHORT).show();
|
Toast.makeText(getApplicationContext(), R.string.comment_send_empty_comment, Toast.LENGTH_SHORT).show();
|
||||||
else if (v == dmsBinding.commentSend) {
|
return;
|
||||||
|
}
|
||||||
final CommentAction action = new CommentAction(dmsBinding.commentText.getText().toString(), threadid);
|
final CommentAction action = new CommentAction(dmsBinding.commentText.getText().toString(), threadid);
|
||||||
action.setOnTaskCompleteListener(result -> {
|
action.setOnTaskCompleteListener(result -> {
|
||||||
if (!result) {
|
if (!result) {
|
||||||
|
Loading…
Reference in New Issue
Block a user