allow multi-line-messages when system-emojis are enabled, closes #1015

This commit is contained in:
B. Petersen 2019-08-07 12:25:15 +02:00
parent fd0e07c9ee
commit f31f86d616
No known key found for this signature in database
GPG key ID: 3B88E92DEA8E9AFC

View file

@ -100,7 +100,8 @@ public class ComposeText extends EmojiEditText {
}
public void setTransport(TransportOption transport) {
final boolean useSystemEmoji = Prefs.isSystemEmojiPreferred(getContext());
// do not add InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE
// as this removes the ability to compose multi-line messages.
int imeOptions = (getImeOptions() & ~EditorInfo.IME_MASK_ACTION) | EditorInfo.IME_ACTION_SEND;
int inputType = getInputType();
@ -108,10 +109,6 @@ public class ComposeText extends EmojiEditText {
if (isLandscape()) setImeActionLabel(getContext().getString(R.string.menu_send), EditorInfo.IME_ACTION_SEND);
else setImeActionLabel(null, 0);
if (useSystemEmoji) {
inputType = (inputType & ~InputType.TYPE_MASK_VARIATION) | InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE;
}
setInputType(inputType);
setImeOptions(imeOptions);
setHint(transport.getComposeHint(),null);