use setText instead of append()
This commit is contained in:
parent
93cb17834a
commit
84fa529256
|
@ -2452,12 +2452,14 @@ public class ConversationFragment extends XmppFragment
|
||||||
this.binding.textSendButton.setContentDescription(
|
this.binding.textSendButton.setContentDescription(
|
||||||
activity.getString(R.string.send_message_to_x, conversation.getName()));
|
activity.getString(R.string.send_message_to_x, conversation.getName()));
|
||||||
this.binding.textinput.setKeyboardListener(null);
|
this.binding.textinput.setKeyboardListener(null);
|
||||||
this.binding.textinput.setText("");
|
|
||||||
final boolean participating =
|
final boolean participating =
|
||||||
conversation.getMode() == Conversational.MODE_SINGLE
|
conversation.getMode() == Conversational.MODE_SINGLE
|
||||||
|| conversation.getMucOptions().participating();
|
|| conversation.getMucOptions().participating();
|
||||||
if (participating) {
|
if (participating) {
|
||||||
this.binding.textinput.append(this.conversation.getNextMessage());
|
this.binding.textinput.setText(this.conversation.getNextMessage());
|
||||||
|
this.binding.textinput.setSelection(this.binding.textinput.length());
|
||||||
|
} else {
|
||||||
|
this.binding.textinput.setText(MessageUtils.EMPTY_STRING);
|
||||||
}
|
}
|
||||||
this.binding.textinput.setKeyboardListener(this);
|
this.binding.textinput.setKeyboardListener(this);
|
||||||
messageListAdapter.updatePreferences();
|
messageListAdapter.updatePreferences();
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class MessageUtils {
|
||||||
|
|
||||||
private static final Pattern LTR_RTL = Pattern.compile("(\\u200E[^\\u200F]*\\u200F){3,}");
|
private static final Pattern LTR_RTL = Pattern.compile("(\\u200E[^\\u200F]*\\u200F){3,}");
|
||||||
|
|
||||||
private static final String EMPTY_STRING = "";
|
public static final String EMPTY_STRING = "";
|
||||||
|
|
||||||
public static String prepareQuote(Message message) {
|
public static String prepareQuote(Message message) {
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
|
|
Loading…
Reference in a new issue