|
|
|
@ -64,7 +64,8 @@ public class ComposeText extends EmojiEditText {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setTransport(TransportOption transport) {
|
|
|
|
|
final boolean enterSends = TextSecurePreferences.isEnterSendsEnabled(getContext());
|
|
|
|
|
final boolean enterSends = TextSecurePreferences.isEnterSendsEnabled(getContext());
|
|
|
|
|
final boolean useSystemEmoji = TextSecurePreferences.isSystemEmojiPreferred(getContext());
|
|
|
|
|
|
|
|
|
|
int imeOptions = (getImeOptions() & ~EditorInfo.IME_MASK_ACTION) | EditorInfo.IME_ACTION_SEND;
|
|
|
|
|
int inputType = getInputType();
|
|
|
|
@ -72,6 +73,10 @@ public class ComposeText extends EmojiEditText {
|
|
|
|
|
if (isLandscape()) setImeActionLabel(transport.getComposeHint(), EditorInfo.IME_ACTION_SEND);
|
|
|
|
|
else setImeActionLabel(null, 0);
|
|
|
|
|
|
|
|
|
|
if (useSystemEmoji) {
|
|
|
|
|
inputType = (inputType & ~InputType.TYPE_MASK_VARIATION) | InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inputType = !isLandscape() && enterSends
|
|
|
|
|
? inputType & ~InputType.TYPE_TEXT_FLAG_MULTI_LINE
|
|
|
|
|
: inputType | InputType.TYPE_TEXT_FLAG_MULTI_LINE;
|
|
|
|
|