aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-05-03 21:04:18 +0200
committerChristian Schneppe <christian@pix-art.de>2019-05-03 21:04:18 +0200
commit1cf16eaf259f813a1b3a71cfebb563a6906ea4cc (patch)
tree46192a314379dacf3975da23a5d0ad1a771adda8 /src/main/java/de/pixart/messenger
parent0f52124ef5d008c75e4908e67bf9256e160e6967 (diff)
put PM hint above edittext
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Conversation.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java7
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();