diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-11-08 19:24:54 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-11-08 19:24:54 +0100 |
commit | f090b0f47d1eb10132e32b5f9f97ebd493db70a7 (patch) | |
tree | 099c53c5b684318a90c57e8b4860e56b1fe8a443 /src/main/java/de/pixart | |
parent | dc1f76d1b482d04e5d065b38527c9629d303c98b (diff) | |
parent | dccfc8c5cb926f4f5564a3239accdd7900df4f26 (diff) |
Merge branch 'master' of https://github.com/kriztan/Pix-Art-Messenger
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 2 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index be4ca8af4..45929344c 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -3091,7 +3091,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke } private int messageInputBubble() { - return activity.isDarkTheme() ? R.drawable.message_bubble_sent_blue_dark : R.drawable.message_bubble_sent_blue; + return activity.isDarkTheme() ? R.drawable.message_bubble_sent_dark : R.drawable.message_bubble_sent; } public Conversation getConversation() { diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java index bc65fd68a..dd24c440d 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -211,6 +211,14 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie } } + private int getWarningTextColor(boolean onDark) { + if (onDark) { + return ContextCompat.getColor(activity, R.color.white70); + } else { + return ContextCompat.getColor(activity, R.color.black26); + } + } + private void displayStatus(ViewHolder viewHolder, final Message message, int type, boolean darkBackground) { String filesize = null; String info = null; @@ -965,7 +973,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie } else { viewHolder.message_box.setBackgroundResource(darkBackground ? R.drawable.message_bubble_received_warning_dark: R.drawable.message_bubble_received_warning); viewHolder.encryption.setVisibility(View.VISIBLE); - viewHolder.encryption.setTextColor(activity.getWarningTextColor()); + viewHolder.encryption.setTextColor(this.getWarningTextColor(darkBackground)); if (omemoEncryption && !message.isTrusted()) { viewHolder.encryption.setText(R.string.not_trusted); } else { @@ -975,7 +983,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie } if (type == SENT) { - viewHolder.message_box.setBackgroundResource(activity.isDarkTheme() ? R.drawable.message_bubble_sent_blue_dark : R.drawable.message_bubble_sent_blue); + viewHolder.message_box.setBackgroundResource(activity.isDarkTheme() ? R.drawable.message_bubble_sent_dark : R.drawable.message_bubble_sent); } displayStatus(viewHolder, message, type, darkBackground); |