show account details when clicking avatar picture in self chat
This commit is contained in:
parent
8f9640a9e1
commit
c7bdc343ec
|
@ -562,11 +562,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
|||
messagesView.setOnScrollListener(mOnScrollListener);
|
||||
messagesView.setTranscriptMode(ListView.TRANSCRIPT_MODE_NORMAL);
|
||||
messageListAdapter = new MessageAdapter((ConversationActivity) getActivity(), this.messageList);
|
||||
messageListAdapter.setOnContactPictureClicked(new OnContactPictureClicked() {
|
||||
|
||||
@Override
|
||||
public void onContactPictureClicked(Message message) {
|
||||
if (message.getStatus() <= Message.STATUS_RECEIVED) {
|
||||
messageListAdapter.setOnContactPictureClicked(message -> {
|
||||
final boolean received = message.getStatus() <= Message.STATUS_RECEIVED;
|
||||
if (received) {
|
||||
if (message.getConversation().getMode() == Conversation.MODE_MULTI) {
|
||||
Jid user = message.getCounterpart();
|
||||
if (user != null && !user.isBareJid()) {
|
||||
|
@ -575,6 +573,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
|||
}
|
||||
highlightInConference(user.getResourcepart());
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
if (!message.getContact().isSelf()) {
|
||||
String fingerprint;
|
||||
|
@ -585,12 +584,13 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
|||
fingerprint = message.getFingerprint();
|
||||
}
|
||||
activity.switchToContactDetails(message.getContact(), fingerprint);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Account account = message.getConversation().getAccount();
|
||||
Intent intent;
|
||||
if (activity.manuallyChangePresence()) {
|
||||
if (activity.manuallyChangePresence() && !received) {
|
||||
intent = new Intent(activity, SetPresenceActivity.class);
|
||||
intent.putExtra(SetPresenceActivity.EXTRA_ACCOUNT, account.getJid().toBareJid().toString());
|
||||
} else {
|
||||
|
@ -608,8 +608,6 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
|||
intent.putExtra("fingerprint", fingerprint);
|
||||
}
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
});
|
||||
messageListAdapter.setOnContactPictureLongClicked(message -> {
|
||||
if (message.getStatus() <= Message.STATUS_RECEIVED) {
|
||||
|
@ -632,7 +630,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
|||
activity.showQrCode();
|
||||
}
|
||||
});
|
||||
messageListAdapter.setOnQuoteListener(text -> quoteText(text));
|
||||
messageListAdapter.setOnQuoteListener(this::quoteText);
|
||||
messagesView.setAdapter(messageListAdapter);
|
||||
|
||||
registerForContextMenu(messagesView);
|
||||
|
|
Loading…
Reference in New Issue