Allow use of the in-app emoji picker when using system emoji.

This commit is contained in:
Greyson Parrelli
2024-07-19 12:24:12 -04:00
parent 330debcf37
commit e17cf37799
6 changed files with 10 additions and 33 deletions

View File

@@ -210,18 +210,12 @@ public class ComposeText extends EmojiEditText {
}
public void setMessageSendType(MessageSendType messageSendType) {
final boolean useSystemEmoji = SignalStore.settings().isPreferSystemEmoji();
int imeOptions = (getImeOptions() & ~EditorInfo.IME_MASK_ACTION) | EditorInfo.IME_ACTION_SEND;
int inputType = getInputType();
if (isLandscape()) setImeActionLabel(getContext().getString(messageSendType.getComposeHintRes()), EditorInfo.IME_ACTION_SEND);
else setImeActionLabel(null, 0);
if (useSystemEmoji) {
inputType = (inputType & ~InputType.TYPE_MASK_VARIATION) | InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE;
}
setImeOptions(imeOptions);
setHint(getContext().getString(messageSendType.getComposeHintRes()));
setInputType(inputType);

View File

@@ -174,13 +174,8 @@ public class InputPanel extends ConstraintLayout
this.recordLockCancel.setOnClickListener(v -> microphoneRecorderView.cancelAction(true));
if (SignalStore.settings().isPreferSystemEmoji()) {
mediaKeyboard.setVisibility(View.GONE);
emojiVisible = false;
} else {
mediaKeyboard.setVisibility(View.VISIBLE);
emojiVisible = true;
}
mediaKeyboard.setVisibility(View.VISIBLE);
emojiVisible = true;
quoteDismiss.setOnClickListener(v -> clearQuote());