mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
'compose title' is never used, remove dead code
This commit is contained in:
@@ -53,32 +53,27 @@ public class ConversationTitleView extends RelativeLayout {
|
||||
ViewUtil.setTextViewGravityStart(this.subtitle, getContext());
|
||||
}
|
||||
|
||||
public void setTitle(@NonNull GlideRequests glideRequests, @Nullable DcChat dcChat) {
|
||||
public void setTitle(@NonNull GlideRequests glideRequests, @NonNull DcChat dcChat) {
|
||||
setTitle(glideRequests, dcChat, true);
|
||||
}
|
||||
|
||||
public void setTitle(@NonNull GlideRequests glideRequests, @Nullable DcChat dcChat, boolean showSubtitle) {
|
||||
|
||||
public void setTitle(@NonNull GlideRequests glideRequests, @NonNull DcChat dcChat, boolean showSubtitle) {
|
||||
int imgLeft = 0;
|
||||
int imgRight = 0;
|
||||
|
||||
if (dcChat == null) {
|
||||
setComposeTitle();
|
||||
} else {
|
||||
setRecipientTitle(dcChat, showSubtitle);
|
||||
if (Prefs.isChatMuted(dcChat)) {
|
||||
imgLeft = R.drawable.ic_volume_off_white_18dp;
|
||||
}
|
||||
if (dcChat.isVerified()) {
|
||||
imgRight = R.drawable.ic_verified;
|
||||
}
|
||||
this.avatar.setAvatar(glideRequests, DcHelper.getContext(getContext()).getRecipient(dcChat), false);
|
||||
setRecipientTitle(dcChat, showSubtitle);
|
||||
if (Prefs.isChatMuted(dcChat)) {
|
||||
imgLeft = R.drawable.ic_volume_off_white_18dp;
|
||||
}
|
||||
if (dcChat.isVerified()) {
|
||||
imgRight = R.drawable.ic_verified;
|
||||
}
|
||||
this.avatar.setAvatar(glideRequests, DcHelper.getContext(getContext()).getRecipient(dcChat), false);
|
||||
|
||||
title.setCompoundDrawablesWithIntrinsicBounds(imgLeft, 0, imgRight, 0);
|
||||
}
|
||||
|
||||
public void setTitle(@NonNull GlideRequests glideRequests, @Nullable DcContact contact) {
|
||||
public void setTitle(@NonNull GlideRequests glideRequests, @NonNull DcContact contact) {
|
||||
// the verified state is _not_ shown in the title. this will be confusing as in the one-to-one-ChatViews, the verified
|
||||
// icon is also not shown as these chats are always opportunistic chats
|
||||
avatar.setAvatar(glideRequests, DcHelper.getContext(getContext()).getRecipient(contact), false);
|
||||
@@ -97,10 +92,6 @@ public class ConversationTitleView extends RelativeLayout {
|
||||
this.avatar.setOnClickListener(listener);
|
||||
}
|
||||
|
||||
public void setOnAvatarClickListener(@Nullable OnClickListener listener) {
|
||||
this.avatar.setOnClickListener(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOnLongClickListener(@Nullable OnLongClickListener listener) {
|
||||
this.content.setOnLongClickListener(listener);
|
||||
@@ -111,12 +102,6 @@ public class ConversationTitleView extends RelativeLayout {
|
||||
this.back.setOnClickListener(listener);
|
||||
}
|
||||
|
||||
private void setComposeTitle() {
|
||||
this.title.setText(null);
|
||||
this.subtitle.setText(null);
|
||||
this.subtitle.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private void setRecipientTitle(DcChat dcChat, boolean showSubtitle) {
|
||||
int chatId = dcChat.getId();
|
||||
if( chatId == DcChat.DC_CHAT_ID_DEADDROP ) {
|
||||
|
||||
Reference in New Issue
Block a user