mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-17 14:58:26 +00:00
parent
e077cc6581
commit
f95435b0f1
@ -64,7 +64,8 @@ public class ComposeText extends EmojiEditText {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setTransport(TransportOption transport) {
|
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 imeOptions = (getImeOptions() & ~EditorInfo.IME_MASK_ACTION) | EditorInfo.IME_ACTION_SEND;
|
||||||
int inputType = getInputType();
|
int inputType = getInputType();
|
||||||
@ -72,6 +73,10 @@ public class ComposeText extends EmojiEditText {
|
|||||||
if (isLandscape()) setImeActionLabel(transport.getComposeHint(), EditorInfo.IME_ACTION_SEND);
|
if (isLandscape()) setImeActionLabel(transport.getComposeHint(), 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;
|
||||||
|
}
|
||||||
|
|
||||||
inputType = !isLandscape() && enterSends
|
inputType = !isLandscape() && enterSends
|
||||||
? inputType & ~InputType.TYPE_TEXT_FLAG_MULTI_LINE
|
? inputType & ~InputType.TYPE_TEXT_FLAG_MULTI_LINE
|
||||||
: inputType | InputType.TYPE_TEXT_FLAG_MULTI_LINE;
|
: inputType | InputType.TYPE_TEXT_FLAG_MULTI_LINE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user