aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-25 22:15:58 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-25 22:29:16 +0200
commitebaa9dcfab701117ff6b0e13979ee46b941c4607 (patch)
treec0005f8f840e4a5c0e2b7c9c8e935d538e86a3d3 /src/main/java/de/pixart/messenger/ui
parent8fcedc431111bf33d3f23b922793cd721cdc1df9 (diff)
some theme fixes
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java20
1 files changed, 6 insertions, 14 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 707deed2b..1b343aa67 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
@@ -319,7 +319,6 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
}
if (error && type == SENT) {
viewHolder.time.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Caption_Waring);
- viewHolder.time.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Caption_Waring);
DownloadableFile file = activity.xmppConnectionService.getFileBackend().getFile(message);
if (file.exists()) {
if (activity.xmppConnectionService.mHttpConnectionManager.getAutoAcceptFileSize() >= message.getFileParams().size) {
@@ -336,14 +335,6 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
viewHolder.resend_button.setText(R.string.send_again);
viewHolder.resend_button.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_resend_grey600_48dp, 0, 0, 0);
viewHolder.resend_button.setOnClickListener(v -> mConversationFragment.resendMessage(message));
- } else if (!error && type == SENT) {
- viewHolder.resend_button.setVisibility(View.GONE);
- if (darkBackground) {
- viewHolder.time.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Caption_OnDark);
- } else {
- viewHolder.time.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Caption);
- }
- viewHolder.time.setTextColor(this.getMessageTextColor(darkBackground, false));
} else {
if (darkBackground) {
viewHolder.time.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Caption_OnDark);
@@ -352,6 +343,9 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
}
viewHolder.time.setTextColor(this.getMessageTextColor(darkBackground, false));
}
+ if (!error && type == SENT) {
+ viewHolder.resend_button.setVisibility(View.GONE);
+ }
if (message.getEncryption() == Message.ENCRYPTION_NONE) {
viewHolder.indicator.setVisibility(View.GONE);
} else {
@@ -544,7 +538,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
} else {
viewHolder.messageBody.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Body1);
}
- viewHolder.messageBody.setHighlightColor(ContextCompat.getColor(activity, darkBackground ? R.color.grey800 : R.color.grey500));
+ viewHolder.messageBody.setHighlightColor(darkBackground ? type == SENT ? ContextCompat.getColor(activity, R.color.black26) : ContextCompat.getColor(activity, R.color.grey800) : ContextCompat.getColor(activity, R.color.grey500));
viewHolder.messageBody.setTypeface(null, Typeface.NORMAL);
if (message.getBody() != null) {
final String nick = UIHelper.getMessageDisplayName(message);
@@ -878,7 +872,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
}
}
- boolean darkBackground = type == SENT && !isInValidSession || activity.isDarkTheme();
+ boolean darkBackground = type == RECEIVED && !isInValidSession || activity.isDarkTheme();
if (type == DATE_SEPARATOR) {
if (UIHelper.today(message.getTimeSent())) {
@@ -1007,9 +1001,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
} else {
viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received_warning);
viewHolder.encryption.setVisibility(View.VISIBLE);
- if (!darkBackground) {
- viewHolder.encryption.setTextColor(activity.getWarningTextColor());
- }
+ viewHolder.encryption.setTextColor(activity.getWarningTextColor());
if (omemoEncryption && !message.isTrusted()) {
viewHolder.encryption.setText(R.string.not_trusted);
} else {