mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 17:59:39 +02:00
show name of forwarded in groups, keep title of forwarded messages in grey
This commit is contained in:
parent
ee33cdb7bc
commit
097da7c165
3 changed files with 12 additions and 3 deletions
|
@ -113,6 +113,7 @@
|
||||||
<string name="audio">Audio</string>
|
<string name="audio">Audio</string>
|
||||||
<string name="voice_message">Voice message</string>
|
<string name="voice_message">Voice message</string>
|
||||||
<string name="forwarded_message">Forwarded message</string>
|
<string name="forwarded_message">Forwarded message</string>
|
||||||
|
<string name="forwarded_by">Forwarded by %1$s</string>
|
||||||
<string name="video">Video</string>
|
<string name="video">Video</string>
|
||||||
<string name="documents">Documents</string>
|
<string name="documents">Documents</string>
|
||||||
<string name="contact">Contact</string>
|
<string name="contact">Contact</string>
|
||||||
|
|
|
@ -654,12 +654,15 @@ public class ConversationItem extends LinearLayout
|
||||||
|
|
||||||
private void setGroupMessageStatus() {
|
private void setGroupMessageStatus() {
|
||||||
if (messageRecord.isForwarded()) {
|
if (messageRecord.isForwarded()) {
|
||||||
|
if (groupThread && !messageRecord.isOutgoing() && dcContact !=null) {
|
||||||
|
this.groupSender.setText(context.getString(R.string.forwarded_by, messageRecord.getSenderName(dcContact)));
|
||||||
|
} else {
|
||||||
this.groupSender.setText(context.getString(R.string.forwarded_message));
|
this.groupSender.setText(context.getString(R.string.forwarded_message));
|
||||||
|
}
|
||||||
this.groupSender.setTextColor(context.getResources().getColor(R.color.unknown_sender));
|
this.groupSender.setTextColor(context.getResources().getColor(R.color.unknown_sender));
|
||||||
}
|
}
|
||||||
else if (groupThread && !messageRecord.isOutgoing() && dcContact !=null) {
|
else if (groupThread && !messageRecord.isOutgoing() && dcContact !=null) {
|
||||||
this.groupSender.setText(messageRecord.getSenderName(dcContact));
|
this.groupSender.setText(messageRecord.getSenderName(dcContact));
|
||||||
|
|
||||||
this.groupSender.setTextColor(dcContact.getArgbColor());
|
this.groupSender.setTextColor(dcContact.getArgbColor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,8 +143,13 @@ public class QuoteView extends FrameLayout implements RecipientForeverObserver {
|
||||||
authorView.setVisibility(GONE);
|
authorView.setVisibility(GONE);
|
||||||
quoteBarView.setBackgroundColor(getForwardedColor());
|
quoteBarView.setBackgroundColor(getForwardedColor());
|
||||||
} else if (quotedMsg.isForwarded()) {
|
} else if (quotedMsg.isForwarded()) {
|
||||||
|
DcContact contact = author.getDcContact();
|
||||||
authorView.setVisibility(VISIBLE);
|
authorView.setVisibility(VISIBLE);
|
||||||
|
if (contact == null) {
|
||||||
authorView.setText(getContext().getString(R.string.forwarded_message));
|
authorView.setText(getContext().getString(R.string.forwarded_message));
|
||||||
|
} else {
|
||||||
|
authorView.setText(getContext().getString(R.string.forwarded_by, quotedMsg.getSenderName(contact)));
|
||||||
|
}
|
||||||
authorView.setTextColor(getForwardedColor());
|
authorView.setTextColor(getForwardedColor());
|
||||||
quoteBarView.setBackgroundColor(getForwardedColor());
|
quoteBarView.setBackgroundColor(getForwardedColor());
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue