Reactions popup appending emoticon in subject partially

This commit is contained in:
Arne 2024-04-12 00:55:53 +02:00
parent 290c2e74df
commit 51e3043ede
2 changed files with 20 additions and 5 deletions

View file

@ -3996,7 +3996,7 @@ public class ConversationFragment extends XmppFragment
}
}
private void correctMessage(Message message) {
public void correctMessage(Message message) {
while (message.mergeable(message.next())) {
message = message.next();
}
@ -4015,6 +4015,20 @@ public class ConversationFragment extends XmppFragment
}
}
public void appendReaction (Message message) {
while (message.mergeable(message.next())) {
message = message.next();
}
if (activity != null && activity.xmppConnectionService != null && activity.xmppConnectionService.getBooleanPreference("show_thread_feature", R.bool.show_thread_feature)) {
setThread(message.getThread());
}
if (message.getEncryption() == Message.ENCRYPTION_NONE) {
this.binding.textinputSubject.setText(message.getSubject());
this.binding.textinputSubject.setVisibility(View.VISIBLE);
}
}
private void chooseReaction(Message message) {
while (message.mergeable(message.next())) {
message = message.next();

View file

@ -1696,13 +1696,14 @@ public class MessageAdapter extends ArrayAdapter<Message> {
ReactionPopup popup = new ReactionPopup(activity, config, (position) -> {
if (position.equals(0)) {
mConversationFragment.setupReply(message[0]);
while (message[0].mergeable(message[0].next())) {
message[0] = message[0].next();
}
mConversationFragment.setThread(message[0].getThread());
mConversationFragment.getConversation().setUserSelectedThread(true);
mConversationFragment.binding.textinput.append("\uD83D\uDC4D");
if (activity != null && activity.xmppConnectionService != null && activity.xmppConnectionService.getBooleanPreference("show_thread_feature", R.bool.show_thread_feature)) {
mConversationFragment.setThread(message[0].getThread());
}
mConversationFragment.appendReaction(message[0]);
message[0].setSubject("\uD83D\uDC4D");
} else if (position.equals(1)) {
mConversationFragment.setupReply(message[0]);
while (message[0].mergeable(message[0].next())) {