mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-05 19:41:57 +02:00
allow multi-line-messages when system-emojis are enabled, closes #1015
This commit is contained in:
parent
fd0e07c9ee
commit
f31f86d616
1 changed files with 2 additions and 5 deletions
|
@ -100,7 +100,8 @@ public class ComposeText extends EmojiEditText {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTransport(TransportOption transport) {
|
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 imeOptions = (getImeOptions() & ~EditorInfo.IME_MASK_ACTION) | EditorInfo.IME_ACTION_SEND;
|
||||||
int inputType = getInputType();
|
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);
|
if (isLandscape()) setImeActionLabel(getContext().getString(R.string.menu_send), EditorInfo.IME_ACTION_SEND);
|
||||||
else setImeActionLabel(null, 0);
|
else setImeActionLabel(null, 0);
|
||||||
|
|
||||||
if (useSystemEmoji) {
|
|
||||||
inputType = (inputType & ~InputType.TYPE_MASK_VARIATION) | InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
setInputType(inputType);
|
setInputType(inputType);
|
||||||
setImeOptions(imeOptions);
|
setImeOptions(imeOptions);
|
||||||
setHint(transport.getComposeHint(),null);
|
setHint(transport.getComposeHint(),null);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue