Fix translation issue with media preview.

Fixes #12072
Closes #12092
This commit is contained in:
Sgn-32
2022-03-25 12:12:23 -04:00
committed by Greyson Parrelli
parent cb77165b53
commit 745dfc3fbb
2 changed files with 12 additions and 13 deletions

View File

@@ -203,26 +203,25 @@ public final class MediaPreviewActivity extends PassphraseRequiredActivity
else from = "";
if (showThread) {
String to = null;
String titleText = null;
Recipient threadRecipient = mediaItem.threadRecipient;
if (threadRecipient != null) {
if (mediaItem.outgoing || threadRecipient.isGroup()) {
if (mediaItem.outgoing) {
if (threadRecipient.isSelf()) {
from = getString(R.string.note_to_self);
titleText = getString(R.string.note_to_self);
} else {
to = threadRecipient.getDisplayName(this);
if (mediaItem.outgoing) {
return getString(R.string.MediaPreviewActivity_you_to_s, to);
}
titleText = getString(R.string.MediaPreviewActivity_you_to_s, threadRecipient.getDisplayName(this));
}
} else {
return getString(R.string.MediaPreviewActivity_s_to_you, from);
if (threadRecipient.isGroup()) {
titleText = getString(R.string.MediaPreviewActivity_s_to_s, from, threadRecipient.getDisplayName(this));
} else {
titleText = getString(R.string.MediaPreviewActivity_s_to_you, from);
}
}
}
return to != null ? getString(R.string.MediaPreviewActivity_s_to_s, from, to)
: from;
return titleText != null ? titleText : from;
} else {
return from;
}