diff options
Diffstat (limited to 'src/main/java/de')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Conversation.java | 2 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index 121e9ed06..65dfba12d 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -486,11 +486,13 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl setAttribute(ATTRIBUTE_CRYPTO_TARGETS, acceptedTargets); } + //TODO store uuid in attribute public boolean setCorrectingMessage(Message correctingMessage) { this.correctingMessage = correctingMessage; return correctingMessage == null && draftMessage != null; } + //TODO: dynamically find by uuid public Message getCorrectingMessage() { return this.correctingMessage; } diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index b0a4570fd..780b43209 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -930,19 +930,24 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke public void updateChatMsgHint() { final boolean multi = conversation.getMode() == Conversation.MODE_MULTI; if (conversation.getCorrectingMessage() != null) { + this.binding.textInputHint.setVisibility(View.GONE); this.binding.textinput.setHint(R.string.send_corrected_message); hideMessageHint(); } else if (multi && conversation.getNextCounterpart() != null) { - this.binding.textinput.setHint(getString( + this.binding.textinput.setHint(R.string.send_unencrypted_message); + this.binding.textInputHint.setVisibility(View.VISIBLE); + this.binding.textInputHint.setText(getString( R.string.send_private_message_to, conversation.getNextCounterpart().getResource())); showMessageHint(getString( R.string.send_private_message_to, conversation.getNextCounterpart().getResource())); } else if (multi && !conversation.getMucOptions().participating()) { + this.binding.textInputHint.setVisibility(View.GONE); this.binding.textinput.setHint(R.string.you_are_not_participating); hideMessageHint(); } else { + this.binding.textInputHint.setVisibility(View.GONE); this.binding.textinput.setHint(UIHelper.getMessageHint(getActivity(), conversation)); hideMessageHint(); getActivity().invalidateOptionsMenu(); |