Use getNbPacticipants instead of canHandleParticipants
This commit is contained in:
parent
4beffb45e8
commit
a75e01954f
2 changed files with 5 additions and 6 deletions
|
@ -438,7 +438,7 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
||||||
|
|
||||||
holder.displayName.setSelected(true); // For animation
|
holder.displayName.setSelected(true); // For animation
|
||||||
|
|
||||||
if (chatRoom.canHandleParticipants()) {
|
if (chatRoom.getNbParticipants() > 1) {
|
||||||
holder.displayName.setText(chatRoom.getSubject());
|
holder.displayName.setText(chatRoom.getSubject());
|
||||||
holder.contactPicture.setImageResource(R.drawable.chat_group_avatar);
|
holder.contactPicture.setImageResource(R.drawable.chat_group_avatar);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -239,7 +239,7 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
||||||
|
|
||||||
private void getContactsForParticipants() {
|
private void getContactsForParticipants() {
|
||||||
mParticipants = new ArrayList<>();
|
mParticipants = new ArrayList<>();
|
||||||
if (mChatRoom.canHandleParticipants()) {
|
if (mChatRoom.getNbParticipants() > 1) {
|
||||||
int index = 0;
|
int index = 0;
|
||||||
StringBuilder participantsLabel = new StringBuilder();
|
StringBuilder participantsLabel = new StringBuilder();
|
||||||
for (Participant p : mChatRoom.getParticipants()) {
|
for (Participant p : mChatRoom.getParticipants()) {
|
||||||
|
@ -287,16 +287,15 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
||||||
|
|
||||||
mRemoteComposing.setVisibility(View.INVISIBLE);
|
mRemoteComposing.setVisibility(View.INVISIBLE);
|
||||||
|
|
||||||
if (core.getCallByRemoteAddress(mRemoteSipUri) != null) {
|
if (core.getCallsNb() > 0) {
|
||||||
mBackToCallButton.setVisibility(View.VISIBLE);
|
mBackToCallButton.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
mBackToCallButton.setVisibility(View.GONE);
|
mBackToCallButton.setVisibility(View.GONE);
|
||||||
if (mChatRoom.canHandleParticipants()) {
|
if (mChatRoom.getNbParticipants() > 1) {
|
||||||
mCallButton.setVisibility(View.GONE);
|
mCallButton.setVisibility(View.GONE);
|
||||||
mGroupInfosButton.setVisibility(View.VISIBLE);
|
mGroupInfosButton.setVisibility(View.VISIBLE);
|
||||||
mRoomLabel.setText(mChatRoom.getSubject());
|
mRoomLabel.setText(mChatRoom.getSubject());
|
||||||
mParticipantsLabel.setVisibility(View.VISIBLE);
|
mParticipantsLabel.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
mCallButton.setVisibility(View.VISIBLE);
|
mCallButton.setVisibility(View.VISIBLE);
|
||||||
mGroupInfosButton.setVisibility(View.GONE);
|
mGroupInfosButton.setVisibility(View.GONE);
|
||||||
|
@ -428,7 +427,7 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onIsComposingReceived(ChatRoom cr, Address remoteAddr, boolean isComposing) {
|
public void onIsComposingReceived(ChatRoom cr, Address remoteAddr, boolean isComposing) {
|
||||||
if (cr.canHandleParticipants() && cr.getNbParticipants() > 2) {
|
if (cr.getNbParticipants() > 1) {
|
||||||
ArrayList<String> composing = new ArrayList<>();
|
ArrayList<String> composing = new ArrayList<>();
|
||||||
for (Address a : cr.getComposingAddresses()) {
|
for (Address a : cr.getComposingAddresses()) {
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
|
|
Loading…
Reference in a new issue