aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-08-01 10:52:07 +0200
committerChristian Schneppe <christian@pix-art.de>2017-08-01 10:52:07 +0200
commit18dfd6556f756951c6f815d003cb2b6825951c9b (patch)
tree89b41546f5abe63bc59d3395c9202d5b597b55ec /src/main/java/de/pixart
parentb7633e713fa79a8ab53c150726451d082fc3afd0 (diff)
set focusable=false instead of enabled=false for rooms w/o voice
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index 9cf2120fa..6ee9552e8 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -935,9 +935,6 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
}
this.conversation = conversation;
- boolean canWrite = this.conversation.getMode() == Conversation.MODE_SINGLE || this.conversation.getMucOptions().participating();
- this.mEditMessage.setEnabled(canWrite);
- this.mSendButton.setEnabled(canWrite);
this.mEditMessage.setKeyboardListener(null);
this.mEditMessage.setText("");
this.mEditMessage.append(this.conversation.getNextMessage());
@@ -1145,7 +1142,8 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
if (!activity.isConversationsOverviewVisable() || !activity.isConversationsOverviewHideable()) {
activity.sendReadMarkerIfNecessary(conversation);
}
- this.updateSendButton();
+ updateSendButton();
+ updateEditablity();
}
}
}
@@ -1261,6 +1259,14 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
return R.drawable.ic_send_text_offline;
}
+ private void updateEditablity() {
+ boolean canWrite = this.conversation.getMode() == Conversation.MODE_SINGLE || this.conversation.getMucOptions().participating();
+ this.mEditMessage.setFocusable(canWrite);
+ this.mEditMessage.setFocusableInTouchMode(canWrite);
+ this.mSendButton.setEnabled(canWrite);
+ this.mEditMessage.setCursorVisible(canWrite);
+ }
+
public void updateSendButton() {
final Conversation c = this.conversation;
final SendButtonAction action;