aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-11-08 19:24:54 +0100
committerChristian Schneppe <christian@pix-art.de>2018-11-08 19:24:54 +0100
commitf090b0f47d1eb10132e32b5f9f97ebd493db70a7 (patch)
tree099c53c5b684318a90c57e8b4860e56b1fe8a443 /src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
parentdc1f76d1b482d04e5d065b38527c9629d303c98b (diff)
parentdccfc8c5cb926f4f5564a3239accdd7900df4f26 (diff)
Merge branch 'master' of https://github.com/kriztan/Pix-Art-Messenger
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java')
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java12
1 files changed, 10 insertions, 2 deletions
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);