aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-04-26 20:36:04 +0200
committerChristian Schneppe <christian@pix-art.de>2017-04-26 20:36:04 +0200
commitba792f819234736132ca1cee70ab26954a85572e (patch)
tree364151c40c52cbf434e8c2cba5a96bf6aa7ef4ce /src/main/java/de/pixart/messenger/ui
parentc106bb872eaa042effa0263eded078fd027ff862 (diff)
code cleanup: made conversation property final in message object
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index c9fc7aeb2..e7526e315 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -400,7 +400,8 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
private void sendMessage() {
final String body = mEditMessage.getText().toString();
- if (body.length() == 0 || this.conversation == null) {
+ final Conversation conversation = this.conversation;
+ if (body.length() == 0 || conversation == null) {
return;
}
final Message message;
@@ -418,7 +419,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
message.setEdited(message.getUuid());
message.setUuid(UUID.randomUUID().toString());
}
- switch (conversation.getNextEncryption()) {
+ switch (message.getConversation().getNextEncryption()) {
case Message.ENCRYPTION_OTR:
sendOtrMessage(message);
break;