1
0
Fork 1
This commit is contained in:
Arne 2024-04-13 00:22:33 +02:00
parent 4bbeb4e6d4
commit 3342ff0804
4 changed files with 7 additions and 11 deletions

View file

@ -1381,7 +1381,7 @@ public class ConversationFragment extends XmppFragment
}
}
private void sendMessage() {
public void sendMessage() {
if (mediaPreviewAdapter.hasAttachments()) {
commitAttachments();
return;
@ -1390,7 +1390,7 @@ public class ConversationFragment extends XmppFragment
if (body == null) body = new SpannableStringBuilder("");
final Conversation conversation = this.conversation;
final boolean hasSubject = binding.textinputSubject.getText().length() > 0;
if (conversation == null || (body.length() == 0 && (conversation.getThread() == null || !hasSubject))) {
if (conversation == null || (body.length() == 0 && (conversation.getThread() == null && !hasSubject))) {
return;
}
if (trustKeysIfNeeded(conversation, REQUEST_TRUST_KEYS_TEXT)) {

View file

@ -1703,7 +1703,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
mConversationFragment.setThread(message[0].getThread());
}
mConversationFragment.appendReaction(message[0]);
message[0].setSubject("\uD83D\uDC4D");
// message[0].setSubject("\uD83D\uDC4D");
} else if (position.equals(1)) {
mConversationFragment.setupReply(message[0]);
while (message[0].mergeable(message[0].next())) {
@ -1972,12 +1972,8 @@ public class MessageAdapter extends ArrayAdapter<Message> {
}
}
if (type == RECEIVED || type == SENT) {
if (message[0].getSubject() == null) {
viewHolder.subject.setVisibility(GONE);
} else {
viewHolder.subject.setVisibility(View.VISIBLE);
viewHolder.subject.setText(message[0].getSubject());
}
viewHolder.subject.setVisibility(View.VISIBLE);
viewHolder.subject.setText(message[0].getSubject());
}
if (type == SENT) {

View file

@ -96,7 +96,7 @@
<TextView
android:id="@+id/message_subject"
android:visibility="gone"
android:visibility="visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"

View file

@ -111,7 +111,7 @@
<TextView
android:id="@+id/message_subject"
android:visibility="gone"
android:visibility="visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"