Rename Recipient.isLocalNumber() to Recipient.isSelf()

This commit is contained in:
Greyson Parrelli
2020-10-19 16:27:49 -04:00
committed by Alan Evans
parent 5eaac6cb17
commit ead64d92a5
37 changed files with 94 additions and 120 deletions

View File

@@ -383,18 +383,18 @@ final class MediaGalleryAllAdapter extends StickyHeaderGridAdapter {
}
private String getSentFromToString(@NonNull Recipient from, @NonNull Recipient thread) {
if (from.isLocalNumber() && from == thread) {
if (from.isSelf() && from == thread) {
return context.getString(R.string.note_to_self);
}
if (showThread && (from.isLocalNumber() || thread.isGroup())) {
if (from.isLocalNumber()) {
if (showThread && (from.isSelf() || thread.isGroup())) {
if (from.isSelf()) {
return context.getString(R.string.MediaOverviewActivity_sent_by_you_to_s, thread.getDisplayName(context));
} else {
return context.getString(R.string.MediaOverviewActivity_sent_by_s_to_s, from.getDisplayName(context), thread.getDisplayName(context));
}
} else {
if (from.isLocalNumber()) {
if (from.isSelf()) {
return context.getString(R.string.MediaOverviewActivity_sent_by_you);
} else {
return context.getString(R.string.MediaOverviewActivity_sent_by_s, from.getDisplayName(context));